NSURLRequest(KSTExtensions)
@interface NSURLRequest (KSTExtensions)
/**
Returns `[self KST_URLRequestWithURL:URL HTTPMethod:HTTPMethod HTTPHeaderFields:nil]`.
@param URL The URL for the request
@param HTTPMethod The HTTP method for the request
@return The request
*/
+ (NSURLRequest *)KST_URLRequestWithURL:(NSURL *)URL HTTPMethod:(KSTHTTPMethod)HTTPMethod;
/**
Creates and returns an `NSURLRequest` instance with the provided *URL*, *HTTPMethod* and *HTTPHeaderFields*.
@param URL The URL for the request
@param HTTPMethod The HTTP method for the request
@param HTTPHeaderFields The HTTP header fields for the request
@return The request
*/
+ (NSURLRequest *)KST_URLRequestWithURL:(NSURL *)URL HTTPMethod:(KSTHTTPMethod)HTTPMethod HTTPHeaderFields:(nullable NSDictionary<KSTHTTPHeaderField, NSString *> *)HTTPHeaderFields;
@end
Undocumented
-
Returns
[self KST_URLRequestWithURL:URL HTTPMethod:HTTPMethod HTTPHeaderFields:nil].Declaration
Objective-C
+ (nonnull NSURLRequest *)KST_URLRequestWithURL:(nonnull NSURL *)URL HTTPMethod: (nonnull KSTHTTPMethod)HTTPMethod;Parameters
URLThe URL for the request
HTTPMethodThe HTTP method for the request
Return Value
The request
-
Creates and returns an
NSURLRequestinstance with the provided URL, HTTPMethod and HTTPHeaderFields.Declaration
Objective-C
+ (nonnull NSURLRequest *) KST_URLRequestWithURL:(nonnull NSURL *)URL HTTPMethod:(nonnull KSTHTTPMethod)HTTPMethod HTTPHeaderFields: (nullable NSDictionary<KSTHTTPHeaderField, NSString *> *) HTTPHeaderFields;Parameters
URLThe URL for the request
HTTPMethodThe HTTP method for the request
HTTPHeaderFieldsThe HTTP header fields for the request
Return Value
The request
NSURLRequest(KSTExtensions) Category Reference