Differences From Artifact [e93ee6e64d]:
- File
src/OFHTTPClient.h
— part of check-in
[8681bba25e]
at
2018-02-18 00:20:39
on branch trunk
— OFHTTPClient: Add a callback for the request body
This is in preparation for removing the body from OFHTTPRequest.
Having it as OFData that is part of the OFHTTPRequest was a bad idea, as
it does not allow streaming. (user: js, size: 7417) [annotate] [blame] [check-ins using]
To Artifact [baab318aa5]:
- File
src/OFHTTPClient.h
— part of check-in
[f80b0d270c]
at
2018-02-25 15:48:59
on branch trunk
— OFHTTPClient: Reintroduce -[performRequest:]
This uses -[asyncPerformRequest:redirects:context:] under the hood and
runs a runloop until it finished. (user: js, size: 9715) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
184 185 186 187 188 189 190 191 192 193 194 195 196 197 | /*! * @brief Creates a new OFHTTPClient. * * @return A new, autoreleased OFHTTPClient */ + (instancetype)client; /*! * @brief Asynchronously performs the specified HTTP request. * * @param request The request to perform * @param context A context object to be passed to the delegate */ - (void)asyncPerformRequest: (OFHTTPRequest *)request | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | /*! * @brief Creates a new OFHTTPClient. * * @return A new, autoreleased OFHTTPClient */ + (instancetype)client; /*! * @brief Synchronously performs the specified HTTP request. * * @note You must not change the delegate while a synchronous request is * running! If you want to change the delegate during the request, * perform an asynchronous request instead! * * @param request The request to perform * @return The OFHTTPResponse for the request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request; /*! * @brief Synchronously performs the specified HTTP request. * * @note You must not change the delegate while a synchronous request is * running! If you want to change the delegate during the request, * perform an asynchronous request instead! * * @param request The request to perform * @param redirects The maximum number of redirects after which no further * attempt is done to follow the redirect, but instead the * redirect is treated as an OFHTTPResponse * @return The OFHTTPResponse for the request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects; /*! * @brief Synchronously performs the specified HTTP request. * * @note You must not change the delegate while a synchronous request is * running! If you want to change the delegate during the request, * perform an asynchronous request instead! * * @param request The request to perform * @param context A context object to be passed to the delegate * @return The OFHTTPResponse for the request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request context: (nullable id)context; /*! * @brief Synchronously performs the specified HTTP request. * * @note You must not change the delegate while a synchronous request is * running! If you want to change the delegate during the request, * perform an asynchronous request instead! * * @param request The request to perform * @param redirects The maximum number of redirects after which no further * attempt is done to follow the redirect, but instead the * redirect is treated as an OFHTTPResponse * @param context A context object to be passed to the delegate * @return The OFHTTPResponse for the request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects context: (nullable id)context; /*! * @brief Asynchronously performs the specified HTTP request. * * @param request The request to perform * @param context A context object to be passed to the delegate */ - (void)asyncPerformRequest: (OFHTTPRequest *)request |
︙ | ︙ |