@@ -18,10 +18,12 @@ #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif +OF_ASSUME_NONNULL_BEGIN + @class OFHTTPClient; @class OFHTTPRequest; @class OFHTTPResponse; @class OFURL; @class OFTCPSocket; @@ -106,11 +108,11 @@ bool _lastWasHEAD; OFHTTPResponse *_lastResponse; } #ifdef OF_HAVE_PROPERTIES -@property (assign) id delegate; +@property (assign, nullable) id delegate; @property bool insecureRedirectsAllowed; #endif /*! * @brief Creates a new OFHTTPClient. @@ -122,18 +124,18 @@ /*! * @brief Sets the delegate of the HTTP request. * * @param delegate The delegate of the HTTP request */ -- (void)setDelegate: (id )delegate; +- (void)setDelegate: (nullable id )delegate; /*! * @brief Returns the delegate of the HTTP reqeust. * * @return The delegate of the HTTP request */ -- (id )delegate; +- (nullable id )delegate; /*! * @brief Sets whether redirects from HTTPS to HTTP are allowed. * * @param allowed Whether redirects from HTTPS to HTTP are allowed @@ -172,5 +174,7 @@ - (void)close; @end @interface OFObject (OFHTTPClientDelegate) @end + +OF_ASSUME_NONNULL_END