--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/TG1bli_VoxEJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
I'm wrestling with POST header configuration, too. I don't view http
headers as a configuration option. I view them as a parameter to each
and every call. Whether I'm doing it through $http (where it's easy) or
a $resource object where it is hard/impossible/poorly documented.
The assumption that everything is going to be 'application/json' or you
can override it in config is, in my opinion, not a good one. Often Ajax
developers don't have control of the server and it is not uncommon for
there to be a mixture of 'application/json' and
'application/x-www-form-urlencoded' content-types within the same app
and the same server. If there were an optional headers parameter that
could be defined for each $resource method, that would be the best
solution (for me) I think.
-- Sean
Thanks for opening the issue. I'm OK for now because everything I'm
sending is form-encoded. If I do have to fix it, I'll submit a pull
request with the fix. (I do hope to get more involved with Angular.js
as I learn more and my schedule permits.)
-- Sean