mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: content-type set to text/plain in the digest POST request by overwriting it to application/json
This commit is contained in:
parent
85b1dbd58a
commit
b18ce9ee17
1 changed files with 5 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { GraphQLClient } from 'graphql-request'
|
||||
import { gqlEndpoint, fetchEndpoint } from '../appConfig'
|
||||
import { IncomingMessage } from 'http'
|
||||
import { fetchEndpoint, gqlEndpoint } from '../appConfig'
|
||||
|
||||
declare type RequestCookies = {
|
||||
[key: string]: string
|
||||
|
|
@ -74,7 +74,10 @@ export function apiPoster(path: string, body: any): Promise<Response> {
|
|||
method: 'POST',
|
||||
credentials: 'include',
|
||||
mode: 'cors',
|
||||
headers: requestHeaders(),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
...requestHeaders(),
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue