We currently do not explicitly test that the deserialized object has a URI object (rather than the URL as a string), but manual inspection suggests this works as I'd expect as an end user (that we'd get the URI object back and not a string).
Is there any expectation that to_hash should not contain an actual URI object?
Description
This PR adds the
url
to theto_hash
method of Faraday::Response as discussed in #1474Todos
Review, commentary & discussion
Additional Notes
The url is provided to the hash as-is, which means it'll still be a URI object.
See https://github.com/aaronstillwell/faraday/blob/29ac4eec651f367d4be57985297db20f10796f9d/lib/faraday/response.rb#L65
In the spec, we create a URI object to test with: https://github.com/aaronstillwell/faraday/blob/29ac4eec651f367d4be57985297db20f10796f9d/spec/faraday/response_spec.rb#L6-L9
We currently do not explicitly test that the deserialized object has a URI object (rather than the URL as a string), but manual inspection suggests this works as I'd expect as an end user (that we'd get the URI object back and not a string).
Is there any expectation that
to_hash
should not contain an actual URI object?