-
-
Notifications
You must be signed in to change notification settings - Fork 150
Replace to HTTPTypes Components from Helpers Components #564
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Replace to HTTPTypes Components from Helpers Components #564
Conversation
Hi @zunda-pixel thats a nice change, I was waiting for adopting But yeah, I think we can start by migrating the |
Hi! @grdsdev I tried to replace HTTPRequest, but It is hard... |
Tests/IntegrationTests/Potsgrest/PostgrestResourceEmbeddingTests.swift
Outdated
Show resolved
Hide resolved
688c3b3
to
686a476
Compare
@@ -51,9 +52,9 @@ public class PostgrestBuilder: @unchecked Sendable { | |||
|
|||
/// Set a HTTP header for the request. | |||
@discardableResult | |||
public func setHeader(name: String, value: String) -> Self { | |||
public func setHeader(name: HTTPField.Name, value: String) -> Self { |
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.
This is breaking change, lets keep the name as a String and create the HTTPField.Name internally.
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.
HTTPField.Name.init?(_ name: String) is optional init.
Can we use force unwrap?
@discardableResult
public func setHeader(name: String, value: String) -> Self {
return self.setHeader(
name: HTTPField.Name(name)!,
value: value
)
}
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.
yeah, force unwrap here is fine.
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.
ok, I created.
2e30787
to
1f54086
Compare
Description
HTTP Header
HTTP Method