Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Fix for issue #736: ngResource now accepts headers #965

Closed
wants to merge 2 commits into from

Conversation

maxmart
Copy link
Contributor

@maxmart maxmart commented May 17, 2012

With this fix it is possible to specify HTTP headers in the actions parameter of ngResource.
For example, to be able to send conditional PUT requests you could specify:

$resource('/CreditCard/123', {}, {
  add: {
    method: 'PUT',
    headers: {'If-None-Match': '*'}
  }
});

As I understand it, this should resolve issue #736

@vojtajina
Copy link
Contributor

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

@vojtajina
Copy link
Contributor

Oops, I'm sorry Max, I can see you already did sign the CLA, so please ignore my previous msg...

@stefan79
Copy link

stefan79 commented Jun 5, 2012

Cool. Starting using angular today, found the problem with base authenticated rest resources this afternoon and found the patch this evening. Impressed.....

@maxmart
Copy link
Contributor Author

maxmart commented Jul 2, 2012

ping... ? :)

@stefan79
Copy link

stefan79 commented Jul 2, 2012

Me?

Sent from my iPhone

On 02.07.2012, at 18:10, Max Martinssonreply@reply.github.com wrote:

ping... ? :)


Reply to this email directly or view it on GitHub:
#965 (comment)

@jarretraim
Copy link

Any chance I can get an update on this one? I'm trying to integrate with a Rackspace ReST API and they auth using a custom X-Auth-Header. Is there a workaround without this patch? Or should I just patch my local copy?

@NathanWalker
Copy link

I am also curious of the status on this pull request. Similar to above, trying to integrate with a RESTapi that uses Basic Authentication. Would really like to be able to set the 'Authorization' header with a $resource.

@zergin
Copy link

zergin commented Aug 15, 2012

I'd also like to know the status of this issue. It's critical to be able to set authorization header (among others).

@mhevery
Copy link
Contributor

mhevery commented Sep 4, 2012

sorry about the delay, working on merging it now

@mhevery
Copy link
Contributor

mhevery commented Sep 4, 2012

MERGED

@mhevery mhevery closed this Sep 4, 2012
@nateabele
Copy link

Woohoo! Thanks @mhevery!

@jarretraim
Copy link

Thanks, this is great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants