You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func Webserver(){letserver=Server()
server.get("/hello/{id}"){ request in
request.headers =["Server":"aichy","4":"12"]print(request.queryParams["state"]!)return.ok(request.routeParams["id"]!)// return}
server.get("/"){
request in
request.headers =["Server":"ios","test":"headers"]return.ok("hello world! ")}do{try server.run(port:2121)}catch{}// go to http://localhost:8080/hello/1?state=active in the browser}
Well, actually we need to have defaultHeaders somewhere so that changing "Server" header does not require to change every response.headers. I'm adding this as a feature request. Thank you!
request.headers = ["Server":"ios","test":"headers"]
Don't work~~thanksThe text was updated successfully, but these errors were encountered: