Linked Questions
93 questions linked to/from Why is an OPTIONS request sent and can I disable it?
2 votes
0 answers
7k views
Why API is calling twice? [duplicate]
I'm using axios whenever I call API it would be called twice as I see in network in chrome devtools in the devtool and in the header of the network first one's header looks like this which I don't ...
0 votes
1 answer
2k views
Cors error when sending a PUT request with ajax API [duplicate]
Basically, when I make a PUT request using jQuery.ajax method. It does not work properly. For example: $.ajax({ "url": "http://quironapi.twotigers.local/cidades/editar/1", &...
1 vote
1 answer
1k views
firefox/cors does not allow application/json contentType in POST requests? [duplicate]
I wanted to send a json via POST request (with ajax) to my server, however every attempt was blocked by CORS. Reading about why it's blocked didn't help at all. At some point one of the comments on ...
1 vote
1 answer
901 views
Why does my ReactJS app throw a CORS error for http requests although they complete successfully in Postman app? [duplicate]
Code: function App() { useEffect(() => { axios({ url: 'http://____/user/list', method: 'GET', dataType: 'json', headers: { ...
1 vote
0 answers
578 views
$.ajax post returning 401 [duplicate]
Continue to receive this as a return for a $.ajax post. "401 (API requests require HTTP Basic Auth or OAuth.) Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-...
2 votes
0 answers
389 views
Geoserver access REST in javascript - Why 403 Forbidden? [duplicate]
The documentation of the Geoserver mentions about REST examples. I managed to achieve that using PHP. But I fail with Javascript. It show Status Code 403, which means Forbidden. Here's my javascript ...
-1 votes
2 answers
571 views
Reactjs POST request using axios [duplicate]
I am trying to call a POST request in ReactJs using Axios, but getting an error. Code: const payload = { device_id: 'ASDACCAS', device_type: 'Web', ...
0 votes
1 answer
407 views
Google Chrome changes GET method to OPTIONS using javascript fetch [duplicate]
fetch(BaseURL + type, { method: 'GET', headers: { 'Authorization': 'Bearer' + token } } When I use GET method it changes the method to OPTIONS. Works fine with Safari. Sometimes ...
0 votes
1 answer
243 views
How to use AXIOS to POST to a .php url endpoint in reactJS? [duplicate]
Running into a bad request 400 error when using axios call to endpoint ending in .php. Code for the call looks like this const API = { userLogin: function () { const email = "test@email&...
2 votes
0 answers
238 views
Linkedin API does not have HTTP ok status [duplicate]
I am using Linkedin API v2 to post on my profile and on my company's page. The /accessToken route works fine, but all others (/me, /organizationalEntityAcls, /ugcPosts) give me the following error: ...
1 vote
0 answers
250 views
Can't get basic HTTP POST function to work from localhost with Javascript [duplicate]
I've got a simple localhost server which runs fine from my browser. I provide it a key "name" and value, it returns "Hello " + the value. For example, if I open a browser and enter http://localhost:...
0 votes
0 answers
146 views
POST custom headers in JavaScript [duplicate]
I am working on a project to send an SOAP request using XmlHttpRequest in JavaScript. I want to create custom headers in my request like this: POST https://www.toto.com/soap HTTP/1.1 Accept-Encoding:...
1 vote
0 answers
52 views
How to stop extra request of CosmosDB? [duplicate]
I am using CosmosDB with Blazor WebAssembly (client side). I have noticed one thing, every time there are two same request occur for data. I have attached that extra request detail image. I want to ...
2214 votes
39 answers
3.8m views
Disable same origin policy in Chrome
Is there any way to disable the Same-origin policy on Google's Chrome browser?
547 votes
13 answers
1.3m views
Trying to use fetch and pass in mode: no-cors
I can hit this endpoint, http://catfacts-api.appspot.com/api/facts?number=99 via Postman and it returns JSON Additionally I am using create-react-app and would like to avoid setting up any server ...