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

added jsondecoding/encoding key support for smart unwrap requests #112

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

amyoulton
Copy link
Contributor

The requests using smart unwrap were missing the addition of the decoding/encoding lines, which meant the request always failed if a user provided a key while also using smart unwrap. I added support in. This is unrelated to Issue #108.

@@ -197,6 +197,9 @@ public extension Request where
decoder.userInfo = [
.smartUnwrapKey: smartUnwrapKey
]
decoder.dateDecodingStrategy = .iso8601
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for adding this line? Isn't this the default anyways?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was just for consistency, as I wanted to this request to have the same decoding structure as the original request. Line 120 & 121 in the original file are what I wanted to bring to the request, so we didn't meet weird discrepancies if including unwrap.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, i didnt realize we did that in request already!

@amyoulton amyoulton merged commit 79ca31f into main Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants