BottleRocketStudios / iOS-Hyperspace

An extremely lightweight wrapper around URLSession to make working with APIs a breeze.
Apache License 2.0
47 stars 17 forks source link

Support decoding strategies #115

Closed earlgaspard closed 2 years ago

earlgaspard commented 4 years ago

Implement a way for Hyperspace to support various decoding strategies.

tylermilner commented 4 years ago

You should already be able to decode into any type of object via the transformSuccess(_:) method on the Request protocol. Is this issue to track requirements for the Hyperspace rewrite?

earlgaspard commented 4 years ago

This issue was created after discussing Hyperspace improvements. I am not sure what decoding strategies were needed. Maybe it was making Hyperspace improvements to make supporting keyDecodingStrategys easier. This issue was not added to track requirements for a rewrite.

wmcginty commented 2 years ago

I'm going to close this one out. Hyperspace supports the ability to provide a custom JSONDecoder as well as a closure that use any method desired to convert the provided TransportSuccess into the expected Response. If there are specific requests for flexibility in the future, we can open new issues.