We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe3f0f6 commit a55b4d9Copy full SHA for a55b4d9
Examples/DeleteJSON/DeleteJSON.swift
@@ -6,7 +6,7 @@ import NIOFoundationCompat
6
@main
7
structDeleteJSON{
8
staticfunc main()asyncthrows{
9
-lethttpClient=HTTPClient(eventLoopGroupProvider:.singleton)
+lethttpClient=HTTPClient.shared
10
11
do{
12
varrequest=HTTPClientRequest(url:"http://localhost:8080/todos/1)")
@@ -17,7 +17,5 @@ struct DeleteJSON{
17
}catch{
18
print("request failed:", error)
19
}
20
- // it is important to shutdown the httpClient after all requests are done, even if one failed
21
-tryawait httpClient.shutdown()
22
23
0 commit comments