Skip to content

Conversation

@plajdo
Copy link
Contributor

@plajdo plajdo commented Aug 21, 2025

Added support for decoding Data? type (optional). Improved support for resolving URLs from optional String? type.

@plajdo plajdo self-assigned this Aug 21, 2025
@matusklasovity matusklasovity requested a review from Copilot August 21, 2025 09:44
Copy link

Copilot AI left a 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 URL that 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.

@plajdo plajdo requested a review from MatusMistrik August 21, 2025 11:17
@plajdo plajdo merged commit 12b9d6a into main Aug 25, 2025
@plajdo plajdo deleted the feature/optional-url-init branch August 25, 2025 09:56
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.

4 participants