Skip to content

Comments

Update RouterGuide.md#83

Merged
adam-fowler merged 2 commits intohummingbird-project:mainfrom
JoachimM7:patch-1
Mar 9, 2025
Merged

Update RouterGuide.md#83
adam-fowler merged 2 commits intohummingbird-project:mainfrom
JoachimM7:patch-1

Conversation

@JoachimM7
Copy link
Contributor

update to the newest code

update to the newest code
@adam-fowler
Copy link
Member

adam-fowler commented Mar 9, 2025

Jeez that was out of date. You shouldn't need to set the content-length header though. That is done for you.

EDIT: actually ignore that. You are using defaultHeaders. I'm currently in transit, will look closer when I get home.

let buffer = ByteBuffer(string: self)
return Response(
status: .ok,
headers: .defaultHummingbirdHeaders(
Copy link
Member

Choose a reason for hiding this comment

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

You could change it to this

headers: [.contentType: "text/plain; charset=utf-8"],

Copy link
Member

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

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

thanks. looks good

@adam-fowler adam-fowler enabled auto-merge (squash) March 9, 2025 15:01
@adam-fowler adam-fowler merged commit c5c6b88 into hummingbird-project:main Mar 9, 2025
1 check passed
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