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

Header are not sent if there are no params #2

Closed
peck opened this issue Mar 10, 2016 · 3 comments
Closed

Header are not sent if there are no params #2

peck opened this issue Mar 10, 2016 · 3 comments
Labels

Comments

@peck
Copy link

peck commented Mar 10, 2016

Cannot make "index" requests with headers

defmodule Api do
use EXRequester
  @headers [
    "Content-Type": "application/json",
    "Accept": "application/json",
    "x-user-token": "a892079d-8028-46ec-8208-225e1a0e3af5",
    "x-user-email": "demo@example.com",
  ]
  @get "/posts"
  defreq get_posts
end

when calling

Api.get_posts()

headers are not populated

@peck peck changed the title Header are not sent if there are no variable headers Header are not sent if there are no params Mar 10, 2016
@nsomar
Copy link
Owner

nsomar commented Mar 11, 2016

Hello @peck
Thanks for contacting me, I just solved this issue
Please update to version 0.5.2

Please let me know if this solve the issue.

@nsomar nsomar added the bug label Mar 11, 2016
@peck
Copy link
Author

peck commented Mar 11, 2016

Seems to work great, I was going to work on a PR for you this weekend but you beat me to it. Thanks!

@nsomar
Copy link
Owner

nsomar commented Mar 12, 2016

Hello for defining a global set of headers check issue #3
I would love a hand into extending and adding more features to exrequester. Like the ability to handle auth, maybe even having an auth1/2 or basic auth.

As for this issue, I will be closing it as its a confirmed fix.

@nsomar nsomar closed this as completed Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants