Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] stdlib: WebClient now uses user specified headers.

  • Loading branch information...
commit 08a58f6c4063d6261fd6f2fafba12d6cbdaab000 1 parent 66928cf
Thomas Refis authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 stdlib/core/web/client/web_client.opa
View
4 stdlib/core/web/client/web_client.opa
@@ -562,7 +562,7 @@ WebClient =
| {none} -> 0
| ~{some} -> String.length(some)
post_headers = "Content-Length: {length}\r\nContent-Type: {options.mimetype}\r\n"
- headers = match default_options.custom_headers with
+ headers = match options.custom_headers with
| {none} -> post_headers
| ~{some} -> "{post_headers}{some}"
generic_options = {
@@ -720,7 +720,7 @@ WebClient =
try_put_with_options_async(location:Uri.uri, content:string, options:WebClient.Put.options, on_result: WebClient.result(string) -> void): void =
length = String.length(content)
put_headers = "Content-Length: {length}\r\nContent-Type: {options.mimetype}\r\n"
- headers = match default_options.custom_headers with
+ headers = match options.custom_headers with
| {none} -> put_headers
| ~{some} -> "{put_headers}{some}"
generic_options = {
Please sign in to comment.
Something went wrong with that request. Please try again.