Anybody faced an issue where a standard fetch request fails on Android (both a Genymotion simulator and an actual device)? All calls succeed on iOS. The error returned by the server is:
"_bodyInit": "<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>UnsupportedHttpVerb</Code><Message>The resource doesn't support specified Http Verb.
RequestId:26f262ac-001e-0078-421e-8950de000000
Time:2018-01-09T07:50:44.3008495Z</Message></Error>",
"_bodyText": "<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>UnsupportedHttpVerb</Code><Message>The resource doesn't support specified Http Verb.
RequestId:26f262ac-001e-0078-421e-8950de000000
Time:2018-01-09T07:50:44.3008495Z</Message></Error>",
"headers": Headers {
"map": Object {
"allow": Array [
"GET,HEAD,PUT,DELETE",
],
"cache-control": Array [
"public, max-age=0",
],
"content-length": Array [
"237",
],
"content-type": Array [
"application/xml",
],
"date": Array [
"Tue, 09 Jan 2018 07:50:43 GMT",
],
"expires": Array [
"-1",
],
"server": Array [
"Microsoft-HTTPAPI/2.0",
],
"x-aspnet-version": Array [
"4.0.30319",
],
"x-ms-request-id": Array [
"26f262ac-001e-0078-421e-8950de000000",
],
"x-powered-by": Array [
"ASP.NET",
],
},
},
"ok": false,
"status": 405,
"statusText": undefined,
"type": "default",
Basically this happens with anything requiring a body to be sent in the request and only from Android. I’m certain (even though the above response says differently) that POSTS are allowed as I can do so from Postman and iOS devices. Additionally, I thought perhaps it was a CORS issue so I made that wide open as well. Finally I’ve tried it against other services and I get the same. I’ve been struggling with this all day and am hoping somebody might have some guidance.
Thanks!
Roland