Differences From Artifact [7a04e238a8]:
- File
tests/OFHTTPClientTests.m
— part of check-in
[d375061886]
at
2018-02-27 20:36:22
on branch trunk
— OFHTTP{Client,Server}: Rename body to requestBody
This makes it more clear that this has nothing to do with the body of
the response, as the body of the response is read from the
OFHTTPResponse itself. (user: js, size: 4118) [annotate] [blame] [check-ins using]
To Artifact [c91311172c]:
- File
tests/OFHTTPClientTests.m
— part of check-in
[eaf458c1e6]
at
2018-12-21 21:39:47
on branch trunk
— Remove context from OFHTTPClientDelegate
It was not very useful as for any OFHTTPClient there can only be one
active request. (user: js, size: 4048) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
104 105 106 107 108 109 110 | } @end @implementation TestsAppDelegate (OFHTTPClientTests) - (void)client: (OFHTTPClient *)client wantsRequestBody: (OFStream *)body request: (OFHTTPRequest *)request | < < | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | } @end @implementation TestsAppDelegate (OFHTTPClientTests) - (void)client: (OFHTTPClient *)client wantsRequestBody: (OFStream *)body request: (OFHTTPRequest *)request { [body writeString: @"Hello"]; } - (void)client: (OFHTTPClient *)client didPerformRequest: (OFHTTPRequest *)request response: (OFHTTPResponse *)response_ { response = [response_ retain]; [[OFRunLoop mainRunLoop] stop]; } - (void)HTTPClientTests |
︙ | ︙ | |||
147 148 149 150 151 152 153 | TEST(@"-[asyncPerformRequest:]", (client = [OFHTTPClient client]) && R([client setDelegate: self]) && (request = [OFHTTPRequest requestWithURL: URL]) && R([request setHeaders: [OFDictionary dictionaryWithObject: @"5" forKey: @"Content-Length"]]) && | | < | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | TEST(@"-[asyncPerformRequest:]", (client = [OFHTTPClient client]) && R([client setDelegate: self]) && (request = [OFHTTPRequest requestWithURL: URL]) && R([request setHeaders: [OFDictionary dictionaryWithObject: @"5" forKey: @"Content-Length"]]) && R([client asyncPerformRequest: request])) [[OFRunLoop mainRunLoop] runUntilDate: [OFDate dateWithTimeIntervalSinceNow: 2]]; [response autorelease]; TEST(@"Asynchronous handling of requests", response != nil) |
︙ | ︙ |