Skip to content

Commit

Permalink
🐛 Fix post with overloaded json content-type charset.
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Oct 14, 2020
1 parent 2399419 commit af48887
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/bundle/wretch.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bundle/wretch.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bundle/wretch.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bundle/wretch.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wretcher.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/wretcher.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/wretcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class Wretcher {
!headers ||
Object.entries(headers).every(([k, v]) =>
k.toLowerCase() !== CONTENT_TYPE_HEADER.toLowerCase() ||
v === JSON_MIME
v.startsWith(JSON_MIME)
)
) ? this.json(body) :
this.body(body)
Expand Down

0 comments on commit af48887

Please sign in to comment.