Skip to content

Conversation

@MrISH
Copy link

@MrISH MrISH commented Mar 1, 2018

POST requests to Job Applications endpoint require api_token to be base64 encoded, and Content-Type to be set as 'application/json'.
Being able to run specs required updating webmock version and codeclimate ruby-test-reporter config.

end

def post_headers
{ 'Authorization' => 'Basic ' + Base64.encode64(api_token), 'Content-Type' => 'application/json' }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be the base64 of api_token + ':' ? (to be a username with no password)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't disagree with you - I will test when I get a chance.
Just working from the API docs https://github.com/grnhse/greenhouse-api-docs/blob/master/source/includes/job-board/_applications.md#request-headers
and it seems to work fine without.

@Ryman
Copy link

Ryman commented Jul 3, 2018

@capablemonkey can somebody at Greenhouse review this?

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

Successfully merging this pull request may close these issues.

2 participants