Skip to content

Commit

Permalink
make get form headers browser compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
PWhiddy committed Dec 14, 2022
1 parent d021cb6 commit d81dab0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ const getImageForm = async (
for (const [key, val] of Object.entries(params)) {
formData.append(key, val);
}
const headers = formData.getHeaders();
headers["Authorization"] = authHeader;
const headers = {
"Content-Type": "multipart/form-data",
"Authorization": authHeader
};
const res = await axios.post(
baseURL + route,
formData,
Expand Down

0 comments on commit d81dab0

Please sign in to comment.