GitXplorerGitXplorer
y

FutureHTTP

public
4 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
b2206dad1dd14cce77f37d1202bdbe9bb137a994

Create README.md

yyounata committed 3 years ago
Unverified
4e09f821bd21639acde7f38ee98e557cbad13c48

Remove dependency on Antitypical/Result, reimplement the only used component of it

yyounata committed 5 years ago
Unverified
9ae8af782027b801bc2253eadf4c429acca5b3cb

Remove dependency on quick and nimble

yyounata committed 5 years ago
Unverified
e22db02b7f20ca7fdd972f33f94c0f9e5b7e0a15

No, really, get support for app transport security in

yyounata committed 5 years ago
Unverified
82b64b1a9d882cb54bb280d1079ee42f14760293

update gems

yyounata committed 5 years ago
Unverified
58f39bf16625a86829bcffadee594489da59a0ad

#available for iOS and OSX

yyounata committed 5 years ago

README

The README file for this repository.

FutureHTTP

The testable network library

Archived

This library is no longer maintained. You should use URLSession with Combine, i.e.:

protocol HTTPClient {
    func dataTask(request: URLRequest) -> AnyPublisher<(data: Data, response: URLResponse), URLError>
}

extension URLSession: HTTPClient {
    func dataTask(request: URLRequest) -> AnyPublisher<(data: Data, response: URLResponse), URLError> {
        return dataTaskPublisher(for: request).eraseToAnyPublisher()
    }
}

// In code:

let client: HTTPClient = URLSession.shared
client.dataTask(request: URLRequest(url: myUrl)).sink { completion in ... } receiveValue: { (data: Data, response: URLResponse) in ... }