SDWebImageDownloaderRequestModifier

A downloader request modifier class with block.

Conveniences

  • Create the request modifier with HTTP Method.

    Note

    This is for convenience, if you need code to control the logic, use block API instead.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMethod:(nullable NSString *)method;

    Swift

    init(method: String?)

    Parameters

    method

    HTTP Method, nil means to GET.

  • Create the request modifier with HTTP Headers.

    Note

    This is for convenience, if you need code to control the logic, use block API instead.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithHeaders:
        (nullable NSDictionary<NSString *, NSString *> *)headers;

    Swift

    init(headers: [String : String]?)

    Parameters

    headers

    HTTP Headers. Case insensitive according to HTTP/1.1(HTTP/2) standard. The headers will override the same fields from original request.

  • Create the request modifier with HTTP Body.

    Note

    This is for convenience, if you need code to control the logic, use block API instead.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBody:(nullable NSData *)body;

    Swift

    init(body: Data?)

    Parameters

    body

    HTTP Body.

  • Create the request modifier with HTTP Method, Headers and Body.

    Note

    This is for convenience, if you need code to control the logic, use block API instead.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithMethod:(nullable NSString *)method
               headers:(nullable NSDictionary<NSString *, NSString *> *)headers
                  body:(nullable NSData *)body;

    Swift

    init(method: String?, headers: [String : String]?, body: Data?)

    Parameters

    method

    HTTP Method, nil means to GET.

    headers

    HTTP Headers. Case insensitive according to HTTP/1.1(HTTP/2) standard. The headers will override the same fields from original request.

    body

    HTTP Body.