Can anyone help me? My worker receives error 1101 when trying to send a POST request to the followi

Can anyone help me?

My worker receives error 1101 when trying to send a POST request to the following endpoint:

https://oauth2.googleapis.com/token

Even though as long as it's on localhost, it's fine. I don't accept any errors.

This is what the code looks like:

var body = new FormData();
body.set('client_id', 'xxxxx');
body.set('client_secret', 'xxxxx');
body.set('code', 'xxxxx');
body.set('grant_type', 'authorization_code');
body.set('redirect_uri', 'xxxxx');

var f = await (await fetch('https://oauth2.googleapis.com/token', {"method": "POST", body})).json();

if(empty(f.error)){

/.../

} else {

/.../

}
InShot_20231013_145037159.jpg
Was this page helpful?