-
Notifications
You must be signed in to change notification settings - Fork 86
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
Compare encoded bodies instead of data when possible Fixes #23 #24
Conversation
@@ -13,8 +13,20 @@ struct Cassette { | |||
for interaction in interactions { | |||
let r = interaction.request | |||
|
|||
let equivalentBody: Bool | |||
|
|||
if let rBody = r.HTTPBody, |
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.
Can we avoid the shortened vars here and just call this requestBody
?
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.
Oh, derp. Just noticed we already have requestBody
... I'm just confused by the naming. What is r
vs. what is request
?
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.
Maybe interactionRequestBody
?
Nice fix! One question around variable naming and then 🍏 |
changed the naming and moved the HTTPBody equality check into into a private function |
LGTM. 🍏 |
One question then 🍏! |
Compare encoded bodies instead of data when possible Fixes #23
We now unwrap the
HTTPBody
NSData
s into and compare usingisEqual