We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb6c5c1 commit 1f54086Copy full SHA for 1f54086
Sources/PostgREST/PostgrestBuilder.swift
@@ -52,7 +52,13 @@ public class PostgrestBuilder: @unchecked Sendable {
52
53
/// Set a HTTP header for the request.
54
@discardableResult
55
- public func setHeader(name: HTTPField.Name, value: String) -> Self {
+ public func setHeader(name: String, value: String) -> Self {
56
+ return self.setHeader(name: .init(name)!, value: value)
57
+ }
58
+
59
+ /// Set a HTTP header for the request.
60
+ @discardableResult
61
+ internal func setHeader(name: HTTPField.Name, value: String) -> Self {
62
mutableState.withValue {
63
$0.request.headers[name] = value
64
}
0 commit comments