Skip to content
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

How do i pass the Accept-Language in the Http header? #90

Closed
cygnusx1 opened this issue Dec 7, 2011 · 3 comments
Closed

How do i pass the Accept-Language in the Http header? #90

cygnusx1 opened this issue Dec 7, 2011 · 3 comments

Comments

@cygnusx1
Copy link

cygnusx1 commented Dec 7, 2011

Hi,

Nice work with this gem btw.

From the LnkedIn api doc, we can pass Accept-Language to get the profile info based on our locale,

How can i pass it using your gem?

Regards

@ryanatwork
Copy link
Collaborator

I'm not quite sure how to do this in the gem. Let me look through it and get back to you on this. We might have to add an option in the initilization to add that header for locale.

@cygnusx1
Copy link
Author

cygnusx1 commented Dec 7, 2011

Thanks

@vladgurovich
Copy link

This is related to accessing out of network profiles instructions:
https://developer.linkedin.com/documents/accessing-out-network-profiles

which require you to pass in x-li-auth-token in the header.

Since in helpers/request.rb
the requests are carried out as follows:

access_token.get("#{API_PATH}#{path}", DEFAULT_HEADERS.merge(options))

the best bet is to modify simple_query function in api/query_methods.rb

to actually pass along the options has or part of it to the get method.

Here is the pull request:

#94

Basically you pass in headers to the gem query mehtods such as profile using :headers key

@sferik sferik closed this as completed Dec 23, 2011
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

4 participants