http.client: default to http:// if not specified.

db4
John Benediktsson 2013-07-15 09:30:22 -07:00
parent 1358a9eb55
commit 0555425861
1 changed files with 6 additions and 1 deletions

View File

@ -140,10 +140,15 @@ SYMBOL: redirects
[ do-redirect ] [ nip ] if
] with-variable ; inline recursive
: request-url ( url -- url' )
dup >url dup protocol>> [ nip ] [
drop "http://" prepend >url
] if ensure-port ;
: <client-request> ( url method -- request )
<request>
swap >>method
swap >url ensure-port >>url ; inline
swap request-url >>url ; inline
PRIVATE>