@@ -14,10 +14,12 @@ * file. */ #import "OFStream.h" #import "OFHTTPRequest.h" + +OF_ASSUME_NONNULL_BEGIN @class OFDictionary OF_GENERIC(KeyType, ObjectType); /*! * @class OFHTTPResponse OFHTTPResponse.h ObjFW/OFHTTPResponse.h @@ -32,11 +34,12 @@ } #ifdef OF_HAVE_PROPERTIES @property of_http_request_protocol_version_t protocolVersion; @property short statusCode; -@property (copy) OFDictionary OF_GENERIC(OFString*, OFString*) *headers; +@property (copy, nullable) OFDictionary OF_GENERIC(OFString*, OFString*) + *headers; #endif /*! * @brief Sets the protocol version of the HTTP request reply. * @@ -83,18 +86,19 @@ /*! * @brief Returns the headers of the reply to the HTTP request. * * @return The headers of the reply to the HTTP request */ -- (OFDictionary OF_GENERIC(OFString*, OFString*)*)headers; +- (nullable OFDictionary OF_GENERIC(OFString*, OFString*)*)headers; /*! * @brief Returns the headers of the reply to the HTTP request. * * @param headers The headers of the reply to the HTTP request */ -- (void)setHeaders: (OFDictionary OF_GENERIC(OFString*, OFString*)*)headers; +- (void)setHeaders: + (nullable OFDictionary OF_GENERIC(OFString*, OFString*)*)headers; /*! * @brief Returns the reply as a string, trying to detect the encoding. * * @return The reply as a string @@ -107,5 +111,7 @@ * * @return The reply as a string */ - (OFString*)stringWithEncoding: (of_string_encoding_t)encoding; @end + +OF_ASSUME_NONNULL_END