@@ -29,17 +29,17 @@ @class OFHTTPResponse; @class OFStream; @class OFTCPSocket; @class OFURL; -/*! +/** * @protocol OFHTTPClientDelegate OFHTTPClient.h ObjFW/OFHTTPClient.h * * @brief A delegate for OFHTTPClient. */ @protocol OFHTTPClientDelegate -/*! +/** * @brief A callback which is called when an OFHTTPClient performed a request. * * @param client The OFHTTPClient which performed the request * @param request The request the OFHTTPClient performed * @param response The response to the request performed @@ -46,11 +46,11 @@ */ - (void)client: (OFHTTPClient *)client didPerformRequest: (OFHTTPRequest *)request response: (OFHTTPResponse *)response; -/*! +/** * @brief A callback which is called when an OFHTTPClient encountered an * exception while performing a request. * * @param client The client which encountered an exception * @param exception The exception the client encountered @@ -59,11 +59,11 @@ - (void)client: (OFHTTPClient *)client didFailWithException: (id)exception request: (OFHTTPRequest *)request; @optional -/*! +/** * @brief A callback which is called when an OFHTTPClient creates a socket. * * This is useful if the connection is using HTTPS and the server requires a * client certificate. This callback can then be used to tell the TLS socket * about the certificate. Another use case is to tell the socket about a SOCKS5 @@ -75,11 +75,11 @@ */ - (void)client: (OFHTTPClient *)client didCreateSocket: (OFTCPSocket *)socket request: (OFHTTPRequest *)request; -/*! +/** * @brief A callback which is called when an OFHTTPClient wants to send the * body for a request. * * @param client The OFHTTPClient that wants to send the body * @param requestBody A stream into which the body of the request should be @@ -88,11 +88,11 @@ */ - (void)client: (OFHTTPClient *)client wantsRequestBody: (OFStream *)requestBody request: (OFHTTPRequest *)request; -/*! +/** * @brief A callback which is called when an OFHTTPClient received headers. * * @param client The OFHTTPClient which received the headers * @param headers The headers received * @param statusCode The status code received @@ -102,11 +102,11 @@ - (void)client: (OFHTTPClient *)client didReceiveHeaders: (OFDictionary OF_GENERIC(OFString *, OFString *) *)headers statusCode: (int)statusCode request: (OFHTTPRequest *)request; -/*! +/** * @brief A callback which is called when an OFHTTPClient wants to follow a * redirect. * * If you want to get the headers and data for each redirect, set the number of * redirects to 0 and perform a new OFHTTPClient for each redirect. However, @@ -133,11 +133,11 @@ statusCode: (int)statusCode request: (OFHTTPRequest *)request response: (OFHTTPResponse *)response; @end -/*! +/** * @class OFHTTPClient OFHTTPClient.h ObjFW/OFHTTPClient.h * * @brief A class for performing HTTP requests. */ OF_SUBCLASSING_RESTRICTED @@ -152,29 +152,29 @@ OFURL *_Nullable _lastURL; bool _lastWasHEAD; OFHTTPResponse *_Nullable _lastResponse; } -/*! +/** * @brief The delegate of the HTTP request. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) OFObject *delegate; -/*! +/** * @brief Whether the HTTP client allows redirects from HTTPS to HTTP. */ @property (nonatomic) bool allowsInsecureRedirects; -/*! +/** * @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! @@ -182,11 +182,11 @@ * @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! @@ -198,18 +198,18 @@ * @return The OFHTTPResponse for the request */ - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects; -/*! +/** * @brief Asynchronously performs the specified HTTP request. * * @param request The request to perform */ - (void)asyncPerformRequest: (OFHTTPRequest *)request; -/*! +/** * @brief Asynchronously performs the specified HTTP request. * * @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 @@ -216,12 +216,12 @@ * redirect is treated as an OFHTTPResponse */ - (void)asyncPerformRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects; -/*! +/** * @brief Closes connections that are still open due to keep-alive. */ - (void)close; @end OF_ASSUME_NONNULL_END