Linked Questions

2156 votes
39 answers
3.5m views

Disable same origin policy in Chrome

Is there any way to disable the Same-origin policy on Google's Chrome browser?
Landon Kuhn's user avatar
  • 77.4k
91 votes
9 answers
240k views

Adding a custom header to HTTP request using angular.js

I am a novice to angular.js, and I am trying to add some headers to a request: var config = {headers: { 'Authorization': 'Basic d2VudHdvcnRobWFuOkNoYW5nZV9tZQ==', 'Accept': ...
trentclowater's user avatar
16 votes
6 answers
38k views

The requested resource does not support http method 'OPTIONS'.?

I am making the following request to an asp.net web api PUT method from my angular.js client: var org = { OrgId: 111, name: 'testing testing' }; $http....
user603007's user avatar
  • 11.6k
6 votes
3 answers
37k views

Angular 4 Http POST not working

I hope everyone is doing great. I've recently started working with angular 4.4, i've been trying to post data to my api server, but unfortunately it's not working. I've spent like 2 days on it but ...
Osama Sheikh's user avatar
  • 1,014
3 votes
1 answer
3k views

Cross-domain jQuery AJAX fails when defining Content-Type

I have an ASP.NET WebAPI client which has the following configuration which allows any cross-domain POST and GET calls: public static void Register(HttpConfiguration config) { config.EnableCors(...
Yeldar Kurmangaliyev's user avatar
3 votes
1 answer
2k views

POST Method got converted to OPTIONS automatically

Basically I am using a POST method but it automatically gets converted to OPTIONS method. I know browser does this but also read that it is fine and should get response as 201, but in my case it is ...
Suraj Khurana's user avatar
3 votes
0 answers
3k views

Not able to make Delete and Put request in Google chrome

Hi I am developing services in web api2 vs2015. Initially i had cors issue i fixed and http verbs like get,delete,put,post working fine in mozilla and internet explorer. I am getting errors in google ...
Niranjan Godbole's user avatar
2 votes
2 answers
2k views

duplicate ajax calls in angularjs

I am using express-jwt to build a restful api. Now the client is making duplicate ajax calls, for the first one the initiator is angularjs and for the second one the initiator is other. The first one ...
Abhishek Prakash's user avatar
2 votes
2 answers
1k views

Two calls in network tab with different type

Am facing an issue, where two calls are getting registered in network tab (PFA) These two calls have same request and responses. Actually there is one call only made from client side. Need to ...
lokesh's user avatar
  • 55
2 votes
1 answer
2k views

Cors requests and MVC5

So I have a view on a controller ... [AllowAnonymous] [Route("MyView")] public ActionResult MyView() { // first attempt at solving problem Response.AddHeader("Access-Control-Allow-Origin", "*"...
War's user avatar
  • 8,574
1 vote
1 answer
1k views

Why is an OPTIONS request sent instead of a PUT in my Angular 2 app? [duplicate]

I am trying to perform the update function of a model, trying to call the Update method in the API via PUT. This is my service client: import { Injectable } from '@angular/core'; import { Http, ...
Eduardo Gabriel Cabrera Japa's user avatar
1 vote
0 answers
90 views

POST going as OPTIONS in firebase node js http request [duplicate]

I am trying to pass data to node js http request (firebase cloud functions) via POST method. angular.module('app', ['ionic']) .controller("HttpGetController", function ($scope, $http) { var ...
kpvsrkp's user avatar
  • 335
1 vote
0 answers
59 views

How to send client side cookies (javascript) to server side (node.js) using Microsoft Bot Framework Directline API? [duplicate]

var xhttp = new XMLHttpRequest(); xhttp.open("POST", "https://34f351jr.ngrok.io/api/messages", false); xhttp.setRequestHeader('set-cookie', 'username=John;expires=Thu, 6 Jul 2017 12:00:00 UTC;path=/;...
Pooja Mehta's user avatar
1 vote
0 answers
570 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-...
VanCoon's user avatar
  • 421
1 vote
2 answers
3k views

Requesting an API with jQuery .ajax() PUT is not working

Hi I have a problem with making a PUT request to an api with jquery. This is my JavaScript: var access_token = "##token##"; var service_url = "##url##"; var data = { access_token: access_token, ...
Schmidko's user avatar
  • 740

15 30 50 per page