Skip to content

Commit

Permalink
Merge pull request #5419 from OceanOak/no-op-2
Browse files Browse the repository at this point in the history
Tidy up the grammar, Add support to db reference, and small fixes
  • Loading branch information
StachuDotNet authored Sep 24, 2024
2 parents e94a305 + f7173cc commit 008af35
Show file tree
Hide file tree
Showing 53 changed files with 2,420 additions and 1,947 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.delete "http://URL") |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -22,5 +22,5 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }

4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/basic-delete.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "delete" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -22,5 +22,5 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.get [] "http://URL") |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -22,4 +22,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/basic-get.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -22,4 +22,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Here's a body!
// HEAD requests aren't supposed to actually return a body. But it seems like the
// clients successfully ignore it.
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.head "http://URL") |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Here's a body!
// HEAD requests aren't supposed to actually return a body. But it seems like the
// clients successfully ignore it.
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "head" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/basic-head.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Content-Length: 568

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "head" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.options "http://URL") |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -22,4 +22,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/basic-options.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "options" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -22,4 +22,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/basic-patch.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "patch" "http://URL" [("Content-Type", "application/json; charset=utf-8")] ("5" |> PACKAGE.Darklang.Stdlib.String.toBytes)) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -24,4 +24,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.post "http://URL" [] ("-1" |> PACKAGE.Darklang.Stdlib.String.toBytes)) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -23,4 +23,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/basic-post.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "post" "http://URL" [] ("-1" |> PACKAGE.Darklang.Stdlib.String.toBytes)) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -23,4 +23,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Hello back
[test]
(let reqHeaders = [("content-type", "application/json; charset=utf-8")]
let response = (PACKAGE.Darklang.Stdlib.HttpClient.put "http://URL" reqHeaders ("string" |> PACKAGE.Darklang.Stdlib.String.toBytes)) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -25,4 +25,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/basic-put.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Hello back
[test]
(let reqHeaders = [("content-type", "application/json; charset=utf-8")]
let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "put" "http://URL" reqHeaders ("string" |> PACKAGE.Darklang.Stdlib.String.toBytes)) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -25,4 +25,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Hello back
[test]
(let reqHeaders = [("Content-Type", "application/json; charset=invalid")]
let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" reqHeaders []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -26,4 +26,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Hello back
[test]
(let reqHeaders = [("Content-Type", "x/notAValidContentType")]
let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" reqHeaders []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -26,4 +26,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/request-form-simple.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Content-Length: 0
[test]
(let reqHeaders = [("Content-type", "application/x-www-form-urlencoded")]
let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" reqHeaders []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Content-Length: LENGTH

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL?f=5.7&n=-0L.0L&l=1231325345345345.34534534634634634" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand Down
4 changes: 2 additions & 2 deletions backend/testfiles/httpclient/v0/request-query-param-int.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL?i=5&n=-1" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -24,4 +24,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Hello back

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 200L
Expand All @@ -26,4 +26,4 @@ Hello back
("content-length", "LENGTH")
("content-type", "text/plain; charset=utf-8")
]
body = "Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes }
body = ("Hello back" |> PACKAGE.Darklang.Stdlib.String.toBytes) }
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-300.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 300L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-301.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 301L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-302.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 302L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-303.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h ->PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 303L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-305.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 305L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-306.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 306L
Expand Down
2 changes: 1 addition & 1 deletion backend/testfiles/httpclient/v0/response-redirect-307.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Location: /v0/response-redirect-destination

[test]
(let response = (PACKAGE.Darklang.Stdlib.HttpClient.request "get" "http://URL" [] []) |> Builtin.unwrap
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> PACKAGE.Darklang.Stdlib.Tuple2.first h != "date")
let respHeaders = response.headers |> PACKAGE.Darklang.Stdlib.List.filter (fun h -> (PACKAGE.Darklang.Stdlib.Tuple2.first h) != "date")
{response with headers = respHeaders}) ==
PACKAGE.Darklang.Stdlib.HttpClient.Response
{ statusCode = 307L
Expand Down
Loading

0 comments on commit 008af35

Please sign in to comment.