]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/http/client/client.factor
http.download: move download words to their own vocabulary
[factor.git] / basis / http / client / client.factor
index e709f5ff8880363eedf2d3bdccf5d511913295ab..f0b86916b0d8912356992f1de498e4a55cf9e338 100644 (file)
@@ -293,28 +293,6 @@ SYMBOL: request-socket
 : http-get* ( url -- response data )
     <get-request> http-request* ;
 
-: file-too-old? ( file duration -- ? )
-    over file-exists? [
-        [ file-info created>> ago ] dip after?
-    ] [ 2drop t ] if ;
-
-: download-name ( url -- name )
-    present file-name "?" split1 drop "/" ?tail drop ;
-
-: download-to ( url file -- )
-    binary [
-        <get-request> [ write ] with-http-request drop
-    ] with-file-writer ;
-
-: ?download-to ( url file -- )
-    dup file-exists? [ 2drop ] [ download-to ] if ;
-
-: ?download-update-to ( url file duration -- )
-    2dup file-too-old? [ drop download-to ] [ 3drop ] if ;
-
-: download ( url -- )
-    dup download-name download-to ;
-
 : <post-request> ( post-data url -- request )
     "POST" <client-request>
         swap >>post-data ;