Updated http client

db4
Slava Pestov 2008-03-07 15:52:41 -06:00
parent 677a1f81ca
commit 17abc90d48
1 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,8 @@
! See http://factorcode.org/license.txt for BSD license.
USING: assocs http kernel math math.parser namespaces sequences
io io.sockets io.streams.string io.files io.timeouts strings
splitting calendar continuations accessors vectors io.encodings.binary ;
splitting calendar continuations accessors vectors io.encodings.latin1
io.encodings.binary ;
IN: http.client
: parse-url ( url -- resource host port )
@ -42,7 +43,7 @@ DEFER: (http-request)
] if ;
: (http-request) ( request -- response stream )
dup host>> over port>> <inet> <client> stdio set
dup host>> over port>> <inet> latin1 <client> stdio set
dup "r" set-global write-request flush read-response
do-redirect ;