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

unneccessary header host #4

Open
thilonel opened this issue Mar 4, 2015 · 0 comments
Open

unneccessary header host #4

thilonel opened this issue Mar 4, 2015 · 0 comments

Comments

@thilonel
Copy link
Contributor

thilonel commented Mar 4, 2015

Since the host is already defined in the request, you should not ask for it again in the header.

require 'escher'
require 'net/http'

client = { api_key_id: 'developer', api_secret: 'MzhKUxb2vlHGfJgAMEaVIWyk5BBFilrg' }

request = {
method: 'GET',
host: 'suite.ett.local',
uri: 'api/v2/internal',
body: 'payload',
headers: [['Content-Type', 'application/json']]
}

escher = Escher::Auth.new('eu/suite/ems_request')
escher.sign!(request, client)

.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/escher-0.3.2/lib/escher/auth.rb:23:in sign!': Missing header: Host (Escher::EscherError) from client.rb:15:in

'

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

1 participant