http.client: support urls without protocols (in addition to strings).

db4
John Benediktsson 2013-07-15 10:28:28 -07:00
parent 0555425861
commit b5484d33ba
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ SYMBOL: redirects
: request-url ( url -- url' ) : request-url ( url -- url' )
dup >url dup protocol>> [ nip ] [ dup >url dup protocol>> [ nip ] [
drop "http://" prepend >url drop dup url? [ present ] when
"http://" prepend >url
] if ensure-port ; ] if ensure-port ;
: <client-request> ( url method -- request ) : <client-request> ( url method -- request )