@@ -5,9 +5,9 @@ import gleam/should
5
5
6
6
pub fn request_test ( ) {
7
7
let req = http . default_req ( )
8
- |> http . set_req_method ( Get )
9
- |> http . set_req_host ( "test-api.service.hmrc.gov.uk" )
10
- |> http . set_req_path ( "/hello/world" )
8
+ |> http . set_method ( Get )
9
+ |> http . set_host ( "test-api.service.hmrc.gov.uk" )
10
+ |> http . set_path ( "/hello/world" )
11
11
|> http . prepend_req_header ( "accept" , "application/vnd.hmrc.1.0+json" )
12
12
13
13
assert Ok ( resp ) = httpc . send ( req )
@@ -25,9 +25,9 @@ pub fn request_test() {
25
25
26
26
pub fn get_request_discards_body_test ( ) {
27
27
let req = http . default_req ( )
28
- |> http . set_req_method ( Get )
29
- |> http . set_req_host ( "test-api.service.hmrc.gov.uk" )
30
- |> http . set_req_path ( "/hello/world" )
28
+ |> http . set_method ( Get )
29
+ |> http . set_host ( "test-api.service.hmrc.gov.uk" )
30
+ |> http . set_path ( "/hello/world" )
31
31
|> http . set_req_body ( "This gets dropped" )
32
32
|> http . prepend_req_header ( "accept" , "application/vnd.hmrc.1.0+json" )
33
33
@@ -46,9 +46,9 @@ pub fn get_request_discards_body_test() {
46
46
47
47
pub fn head_request_discards_body_test ( ) {
48
48
let req = http . default_req ( )
49
- |> http . set_req_method ( Head )
50
- |> http . set_req_host ( "postman-echo.com" )
51
- |> http . set_req_path ( "/get" )
49
+ |> http . set_method ( Head )
50
+ |> http . set_host ( "postman-echo.com" )
51
+ |> http . set_path ( "/get" )
52
52
|> http . set_req_body ( "This gets dropped" )
53
53
54
54
assert Ok ( resp ) = httpc . send ( req )
@@ -66,9 +66,9 @@ pub fn head_request_discards_body_test() {
66
66
67
67
pub fn options_request_discards_body_test ( ) {
68
68
let req = http . default_req ( )
69
- |> http . set_req_method ( Options )
70
- |> http . set_req_host ( "postman-echo.com" )
71
- |> http . set_req_path ( "/get" )
69
+ |> http . set_method ( Options )
70
+ |> http . set_host ( "postman-echo.com" )
71
+ |> http . set_path ( "/get" )
72
72
|> http . set_req_body ( "This gets dropped" )
73
73
74
74
assert Ok ( resp ) = httpc . send ( req )
0 commit comments