Differences From Artifact [9c917ec780]:
- File tests/OFHTTPClientTests.m — part of check-in [c8f7b90082] at 2017-07-22 20:50:27 on branch trunk — Split OFDataArray into OFData and OFMutableData (user: js, size: 2900) [annotate] [blame] [check-ins using]
To 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]
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | + + + + + - - - + + + + | #include "config.h" #include <inttypes.h> #include <string.h> #import "OFHTTPClient.h" #import "OFCondition.h" #import "OFData.h" #import "OFDate.h" #import "OFDictionary.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFRunLoop.h" #import "OFString.h" #import "OFTCPSocket.h" #import "OFThread.h" |
︙ | |||
81 82 83 84 85 86 87 88 89 90 91 92 93 94 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | + + + + + + + + + - - + - + + + + + + + | [client close]; return nil; } @end @implementation TestsAppDelegate (OFHTTPClientTests) - (void)client: (OFHTTPClient *)client didPerformRequest: (OFHTTPRequest *)request response: (OFHTTPResponse *)response_ { response = [response_ retain]; [[OFRunLoop mainRunLoop] stop]; } - (void)HTTPClientTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; HTTPClientTestsServer *server; OFURL *URL; OFHTTPClient *client; OFHTTPRequest *request; |