Created
September 4, 2022 15:54
-
-
Save mrgenixus/1226c272a7009d7edd02106dae631b02 to your computer and use it in GitHub Desktop.
response_json.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REF https://ruby-doc.org/stdlib-2.1.3/libdoc/json/rdoc/JSON.html#method-i-parse | |
module RequestJSONHelpers | |
def response_json | |
JSON.parse(response.body, object_class: HashWithIndifferentAccess) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment