mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 17:53:24 +00:00
set header for urlsearchparams request
This commit is contained in:
@@ -12,7 +12,9 @@ export function serializeBody(body: FetcherOptions['body']): SeralizedBody {
|
|||||||
if (body === undefined || typeof body === 'string' || body instanceof URLSearchParams || body instanceof FormData) {
|
if (body === undefined || typeof body === 'string' || body instanceof URLSearchParams || body instanceof FormData) {
|
||||||
if (body instanceof URLSearchParams && isReactNative()) {
|
if (body instanceof URLSearchParams && isReactNative()) {
|
||||||
return {
|
return {
|
||||||
headers: {},
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
},
|
||||||
body: body.toString(),
|
body: body.toString(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user