Skip to content

$httpConfig doesn't seem to be used by DS even on 1.0.0-beta-1 #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pdemilly opened this issue Aug 21, 2014 · 4 comments
Closed

$httpConfig doesn't seem to be used by DS even on 1.0.0-beta-1 #128

pdemilly opened this issue Aug 21, 2014 · 4 comments

Comments

@pdemilly
Copy link

I don't seem to be able to set some common HTTP headers. My rest server doesn't receive the Authorization header as defined below on a simple rest call like DS(resource).findAll(); However the default baseUri works fine.

'''
MYAPP.config(function (DSProvider, DSHttpAdapterProvider) {
DSProvider.defaults.baseUrl = 'http://localhost/rest/apiv1';
angular.extend (DSHttpAdapterProvider.defaults.$httpConfig, {
headers: {
common: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'APIKey 4arkm7f048rsbe8130ur85gar3jlpoke',
}
},
timeout: 20000
});
});

'''

@pdemilly
Copy link
Author

Actually the old doc was wrong says headers: { common: { } }. The common map is not needed but it looks like that part of the doc is now gone or I could not find it

@jmdobry
Copy link
Member

jmdobry commented Aug 21, 2014

Ya, I just pulled that from angular's docs. So it works?
On Aug 21, 2014 4:57 PM, "Pascal DeMilly" [email protected] wrote:

Actually the old doc was wrong says headers: { common: { } }. The common
map is not needed but it looks like that part of the doc is now gone or I
could not find it


Reply to this email directly or view it on GitHub
#128 (comment)
.

@pdemilly
Copy link
Author

Yes it works once you create a simple map of headers. Is there a mailing list? I have a question in regards to unwrapping promises like Restangular $object. I am thinking about replacing Restangular by your lib and want to evaluate how much work it would take. Thanks. so far so good.

@jmdobry
Copy link
Member

jmdobry commented Aug 22, 2014

Mailing List

@jmdobry jmdobry closed this as completed Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants