@josh-lee why do we need to provide data: '' ? its pretty strange to me. what about GET request ? any idea ?
God this is a life saver!!! Is this the default HTTP protocol behavior or Angular $http behavior?
You need to include a body with the request. Angular removes the content-type header otherwise.
but what if I want to send an object as data? I am working with an ASP.NET Generic HTTP handler, and for some reason, context.Request.Params["formData"] does not work, but a StackOverflow post led me to use string json = new StreamReader(context.Request.InputStream).ReadToEnd(); which works, but I am not exactly relieved to use it since I would rather access the submitted request parameter value by name.