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

    URL

    The URL for the request

    HTTPMethod

    The HTTP method for the request

    Return Value

    The request

  • Creates and returns an NSURLRequest instance 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

    URL

    The URL for the request

    HTTPMethod

    The HTTP method for the request

    HTTPHeaderFields

    The HTTP header fields for the request

    Return Value

    The request