Updated http client
parent
677a1f81ca
commit
17abc90d48
|
@ -2,7 +2,8 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs http kernel math math.parser namespaces sequences
|
USING: assocs http kernel math math.parser namespaces sequences
|
||||||
io io.sockets io.streams.string io.files io.timeouts strings
|
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
|
IN: http.client
|
||||||
|
|
||||||
: parse-url ( url -- resource host port )
|
: parse-url ( url -- resource host port )
|
||||||
|
@ -42,7 +43,7 @@ DEFER: (http-request)
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: (http-request) ( request -- response stream )
|
: (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
|
dup "r" set-global write-request flush read-response
|
||||||
do-redirect ;
|
do-redirect ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue