-
Notifications
You must be signed in to change notification settings - Fork 1
Support for optionals in URL and Data resolution #48
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
Conversation
Support for absolute path in endpoints
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.
Pull Request Overview
This PR adds support for optional types in URL and Data resolution, improving the robustness of the networking library when dealing with nullable values.
- Added support for decoding optional
Data?types in the JSON decoder switch statement - Enhanced URL resolution logic to handle optional base URLs and endpoint paths more gracefully
- Added a convenience initializer for
URLthat accepts optional strings
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Sources/GoodNetworking/Session/NetworkSession.swift | Extended Data type decoding to support optionals and refactored URL resolution logic with improved null handling |
| Sources/GoodNetworking/Models/URLConvertible.swift | Added convenience initializer for URL that accepts optional strings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Added support for decoding
Data?type (optional). Improved support for resolving URLs from optionalString?type.