[swift-corelibs-dev] SR-6405: URLRequest does not capitalise HTTP methods
Ian Partridge
ian at poncho.org.uk
Thu Nov 16 11:18:48 CST 2017
Hi, it looks like Foundation on Darwin capitalises certain HTTP
methods but not others:
```
let methods = ["get", "head", "post", "put", "delete", "connect",
"options", "trace", "patch"]
var x = URLRequest(url: URL(string: "/hello")!)
for m in methods {
x.httpMethod = m
print(x.httpMethod!)
}
```
Output on Darwin:
GET
HEAD
POST
PUT
DELETE
CONNECT
options
trace
patch
Currently on Linux we don't do any capitalization so I'd like to fix this.
Is my list of 6 methods above the definitive list of which HTTP
methods should be capitalized?
Thanks,
--
Ian Partridge
More information about the swift-corelibs-dev
mailing list