heroku / platform-api

Ruby HTTP client for the Heroku API
MIT License
213 stars 86 forks source link

BadRequest - 400 BadRequest Missing Host Header on nearly all functions #65

Closed ejlax closed 7 years ago

ejlax commented 7 years ago

I am using the client.connect_oauth() to generate my client but when trying to use the client to return client.config_var.info_for_app(app_name) (among other calls) Excon returns Excon::Error::BadRequest => '400 Bad Request: missing required Host header' (JSON::ParserError)

I am currently using version 1.0.1 and my oauth_token is generated via the CLI heroku authorizations:create --short

ejlax commented 7 years ago

The issue was actually with the oauth_token being passed into the client creation. there was a "\n" trailing the token which was prematurely ending the headers causing the requests to fail

geemus commented 7 years ago

Ah, got it. Thanks for the update and glad you were able to get that sorted out.