Differences From Artifact [725d764e14]:
- File
utils/ofhttp/OFHTTP.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: 26096) [annotate] [blame] [check-ins using]
To Artifact [7ea7ca97c5]:
- File
utils/ofhttp/OFHTTP.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: 26106) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
904 905 906 907 908 909 910 | if (!_quiet) [of_stdout writeFormat: @"⠒ %@", [URL string]]; request = [OFHTTPRequest requestWithURL: URL]; [request setHeaders: clientHeaders]; [request setMethod: OF_HTTP_REQUEST_METHOD_HEAD]; | | | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | if (!_quiet) [of_stdout writeFormat: @"⠒ %@", [URL string]]; request = [OFHTTPRequest requestWithURL: URL]; [request setHeaders: clientHeaders]; [request setMethod: OF_HTTP_REQUEST_METHOD_HEAD]; [_HTTPClient asyncPerformRequest: request]; return; } _detectedFileName = false; if (!_quiet) [of_stdout writeFormat: @"⇣ %@", [URL string]]; |
︙ | ︙ | |||
945 946 947 948 949 950 951 | } request = [OFHTTPRequest requestWithURL: URL]; [request setHeaders: clientHeaders]; [request setMethod: _method]; [request setBody: _body]; | | | 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | } request = [OFHTTPRequest requestWithURL: URL]; [request setHeaders: clientHeaders]; [request setMethod: _method]; [request setBody: _body]; [_HTTPClient asyncPerformRequest: request]; return; next: [self performSelector: @selector(downloadNextURL) afterDelay: 0]; } @end |