File tree Expand file tree Collapse file tree 3 files changed +24
-15
lines changed
Expand file tree Collapse file tree 3 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 1+ import { HttpRequest , send } from "schwi" ;
2+
3+ const request = new HttpRequest . Builder ( "https://postman-echo.com/cookies/set" )
4+ . setUrlSearchParameter ( "foo1" , "bar1" )
5+ . setUrlSearchParameter ( "foo2" , "bar2" )
6+ . setRedirection ( HttpRequest . Redirection . MANUAL )
7+ . build ( ) ;
8+
9+ const response = await send ( request ) ;
10+ console . log ( response . headers . getSetCookie ( ) ) ;
11+
12+ const body = await response . toString ( ) ;
13+ console . log ( body ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import { HttpRequest , send } from "schwi" ;
2+
3+ const request = new HttpRequest . Builder ( "https://google.com" )
4+ . setRedirection ( HttpRequest . Redirection . FOLLOW )
5+ . build ( ) ;
6+
7+ const response = await send ( request ) ;
8+ console . log ( response . headers . getSetCookie ( ) ) ;
9+
10+ const body = await response . toString ( ) ;
11+ console . log ( body ) ;
You can’t perform that action at this time.
0 commit comments