http.client: support urls without protocols (in addition to strings).
parent
0555425861
commit
b5484d33ba
|
@ -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 )
|
||||||
|
|
Loading…
Reference in New Issue