I'm performing cross-domain POST. In Angular it looks something like this:
$http.post('https://somesite/api', formData)
.success(function (data, status, header, config) {
})
.error (function (data, status, header, config) {
});
Examining the HTTP traffic with Fiddler I can clearly see the request is an
OPTIONS type which you'd expect for cross-domain. However if I send the
same data using Jquery the traffic shows only a POST. There's no pre-flight
options request made at all.
$.ajax({
url: 'https://somesite/api',
type: 'POST',
data: formData,
dataType: 'json',
success: function (result, textStatus, jqXHR) {
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
Shouldn't both of these methods be making a pre-flight options request?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.