Skip to content

Add Trailer Read Test#129

Open
xbhatnag wants to merge 1 commit intomainfrom
trailer-test
Open

Add Trailer Read Test#129
xbhatnag wants to merge 1 commit intomainfrom
trailer-test

Conversation

@xbhatnag
Copy link
Collaborator

@xbhatnag xbhatnag commented Mar 9, 2026

Makes a request to /trailers endpoint and verifies that the trailers are read correctly by the client.

Passes for AHC. Disabled for URLSession.

Makes a request to `/trailers` endpoint and verifies that the trailers are processed correctly.
@xbhatnag xbhatnag added 🔨 semver/patch No public API change. ⚠️ semver/major Breaks existing public API. and removed 🔨 semver/patch No public API change. labels Mar 9, 2026
Copy link
Member

@fabianfett fabianfett left a comment

Choose a reason for hiding this comment

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

Please commit the suggested change before commiting.

Comment on lines +1168 to +1171
// Verify the custom trailer headers
#expect(trailers![.init("X-Trailer-One")!] == "first-value")
#expect(trailers![.init("X-Trailer-Two")!] == "second-value")
#expect(trailers![.init("X-Checksum")!] == "abc123")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Verify the custom trailer headers
#expect(trailers![.init("X-Trailer-One")!] == "first-value")
#expect(trailers![.init("X-Trailer-Two")!] == "second-value")
#expect(trailers![.init("X-Checksum")!] == "abc123")
// Verify the custom trailer headers
#expect(trailers?[.init("X-Trailer-One")!] == "first-value")
#expect(trailers?[.init("X-Trailer-Two")!] == "second-value")
#expect(trailers?[.init("X-Checksum")!] == "abc123")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ semver/major Breaks existing public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants