-
Notifications
You must be signed in to change notification settings - Fork 88
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
Use headers-only for api and app keys with exceptions #189
Conversation
…to shubho/use-headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this 👏
Would it be possible to add a unit test for set_api_and_app_keys_in_params
?
params = extra_params.merge params unless extra_params.nil? | ||
qs_params = params.map { |k, v| CGI.escape(k.to_s) + '=' + CGI.escape(v.to_s) } | ||
qs = '?' + qs_params.join('&') | ||
qs | ||
end | ||
|
||
def set_api_and_app_keys_in_params(url, with_app_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this 👏
Would it be possible to add a unit test forset_api_and_app_keys_in_params
?
Good point. Added a unit test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Datadog now supports api and app keys in headers. Refactoring ruby lib to use headers only. There is an exception for some endpoints which cannot support these