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

Extract HttpRequest object #44

Merged
merged 1 commit into from
Aug 17, 2020
Merged

Extract HttpRequest object #44

merged 1 commit into from
Aug 17, 2020

Conversation

JoelQ
Copy link
Contributor

@JoelQ JoelQ commented Aug 17, 2020

🧰 What's being changed?

Rack::Request provides some niceties over a raw env hash but is still
missing some key behavior such as getting HTTP headers or safely reading
the body.

This extracts an object to that wraps Rack::Request and provides a
nice interface for these things. Some of the methods just delegate to
existing Rack::Request functionality. I made the decision not to try
and isolate the two in testing in order to get more readable tests.

🧪 Testing

This is a pure refactor with no behavior changes. Additional automated unit tests were added around newly public behavior.

`Rack::Request` provides some niceties over a raw env hash but is still
missing some key behavior such as getting HTTP headers or safely reading
the body.

This extracts an object to that wraps `Rack::Request` and provides a
nice interface for these things. Some of the methods just delegate to
existing `Rack::Request` functionality. I made the decision not to try
and isolate the two in testing in order to get more readable tests.
@JoelQ JoelQ merged commit b4f4045 into master Aug 17, 2020
@JoelQ JoelQ deleted the jq-extract-http-request branch August 17, 2020 21:28
djmango pushed a commit to djmango/metrics-sdks that referenced this pull request Sep 19, 2023
@erunion erunion added ruby Issues related to our Ruby SDK and removed area:ruby labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Issues related to our Ruby SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants