1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 10:21:37 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

print body for harmony

This commit is contained in:
sunnylqm
2025-03-05 11:41:20 +08:00
parent 49b0c25a3d
commit e0d4fe81fd

View File

@@ -226,10 +226,11 @@ export class Pushy {
// @ts-ignore
delete fetchBody.buildTime;
}
const stringifyBody = JSON.stringify(fetchBody);
// harmony fetch body is not string
let body: any = fetchBody;
if (Platform.OS === 'ios' || Platform.OS === 'android') {
body = JSON.stringify(fetchBody);
body = stringifyBody;
}
const fetchPayload = {
method: 'POST',
@@ -243,7 +244,7 @@ export class Pushy {
try {
this.report({
type: 'checking',
message: this.options.appKey + ': ' + body,
message: this.options.appKey + ': ' + stringifyBody,
});
resp = await fetch(this.getCheckUrl(), fetchPayload);
} catch (e: any) {