Skip to content

Commit

Permalink
fix: updated initial value of headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhiagrawal001 committed Jan 23, 2024
1 parent 32c850b commit 91ea754
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/AuthHooks.res
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let useApiFetcher = () => {
uri,
~bodyStr: string="",
~bodyFormData=None,
~headers=Dict.make(),
~headers=[("Content-Type", "application/json")]->Dict.fromArray,
~bodyHeader as _=?,
~method_: Fetch.requestMethod,
~authToken as _=?,
Expand Down
9 changes: 8 additions & 1 deletion src/screens/HyperSwitch/APIUtils/APIUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,14 @@ let useUpdateMethod = (~showErrorToast=true, ()) => {
},
})

async (url, body, method, ~bodyFormData=?, ~headers=Dict.make(), ()) => {
async (
url,
body,
method,
~bodyFormData=?,
~headers=[("Content-Type", "application/json")]->Dict.fromArray,
(),
) => {
try {
let res = await fetchApi(
url,
Expand Down

0 comments on commit 91ea754

Please sign in to comment.