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
Copy file name to clipboardExpand all lines: README.md
+8-6
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# swift-nio-http-client
1
+
# SwiftNIOHTTPClient
2
2
This package provides simple HTTP Client library built on top of SwiftNIO.
3
3
4
4
This library provides the following:
@@ -10,7 +10,7 @@ This library provides the following:
10
10
11
11
---
12
12
13
-
**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `swift-nio-htt-client`.
13
+
**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `SwiftNIOHTTPClient`.
14
14
15
15
---
16
16
@@ -25,7 +25,7 @@ Add the following entry in your <code>Package.swift</code> to start using <code>
When dealing with larger amount of data, it's critical to steam the response body instead of aggregating it-memory. Handling a response stream is done using a delegate protocol. The following example demonstrates how to count the number of bytes in a streaming response body:
112
+
When dealing with larger amount of data, it's critical to stream the response body instead of aggregating in-memory. Handling a response stream is done using a delegate protocol. The following example demonstrates how to count the number of bytes in a streaming response body:
113
113
```swift
114
114
classCountingDelegate: HTTPResponseDelegate {
115
115
typealiasResponse=Int
@@ -142,5 +142,7 @@ class CountingDelegate: HTTPResponseDelegate {
142
142
let request =tryHTTPRequest(url: "https://swift.org")
143
143
let delegate =CountingDelegate()
144
144
145
-
let count =try httpClient.execute(request: request, delegate: delegate).wait()
145
+
try httpClient.execute(request: request, delegate: delegate).future.whenSuccess { count in
0 commit comments