mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-02 06:13:11 +08:00
print body for harmony
This commit is contained in:
@@ -226,10 +226,11 @@ export class Pushy {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
delete fetchBody.buildTime;
|
delete fetchBody.buildTime;
|
||||||
}
|
}
|
||||||
|
const stringifyBody = JSON.stringify(fetchBody);
|
||||||
// harmony fetch body is not string
|
// harmony fetch body is not string
|
||||||
let body: any = fetchBody;
|
let body: any = fetchBody;
|
||||||
if (Platform.OS === 'ios' || Platform.OS === 'android') {
|
if (Platform.OS === 'ios' || Platform.OS === 'android') {
|
||||||
body = JSON.stringify(fetchBody);
|
body = stringifyBody;
|
||||||
}
|
}
|
||||||
const fetchPayload = {
|
const fetchPayload = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -243,7 +244,7 @@ export class Pushy {
|
|||||||
try {
|
try {
|
||||||
this.report({
|
this.report({
|
||||||
type: 'checking',
|
type: 'checking',
|
||||||
message: this.options.appKey + ': ' + body,
|
message: this.options.appKey + ': ' + stringifyBody,
|
||||||
});
|
});
|
||||||
resp = await fetch(this.getCheckUrl(), fetchPayload);
|
resp = await fetch(this.getCheckUrl(), fetchPayload);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user