Differences From Artifact [a00a732f44]:
- File
tests/OFHTTPClientTests.m
— part of check-in
[56a18442e2]
at
2017-09-24 00:59:12
on branch trunk
— Make OFHTTPClient asynchronous
This does not make OFHTTPClientResponse completely asynchronous yet.
Since -[initWithURL:] does not work well with an asynchronous API, it no
longer supports HTTP URLs. However, a new, asynchronous API will be
added as a replacement later on. (user: js, size: 3423) [annotate] [blame] [check-ins using]
To Artifact [1220c3f5ba]:
- File
tests/OFHTTPClientTests.m
— part of check-in
[0319fe1eb9]
at
2017-09-24 21:00:09
on branch trunk
— OFHTTPClient: Rename to -[asyncPerformRequest:]
This makes it clear that the request is handled asynchronously and makes
it possible to reintroduce a synchronous version later. (user: js, size: 3433) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
118 119 120 121 122 123 124 | [cond wait]; [cond unlock]; URL = [OFURL URLWithString: [OFString stringWithFormat: @"http://127.0.0.1:%" @PRIu16 "/foo", server->_port]]; | | | | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | [cond wait]; [cond unlock]; URL = [OFURL URLWithString: [OFString stringWithFormat: @"http://127.0.0.1:%" @PRIu16 "/foo", server->_port]]; TEST(@"-[asyncPerformRequest:]", (client = [OFHTTPClient client]) && R([client setDelegate: self]) && R(request = [OFHTTPRequest requestWithURL: URL]) && R([client asyncPerformRequest: request])) [[OFRunLoop mainRunLoop] runUntilDate: [OFDate dateWithTimeIntervalSinceNow: 2]]; [response autorelease]; TEST(@"Asynchronous handling of requests", response != nil) |
︙ | ︙ |