MBXHttpRequest


@interface MBXHttpRequest : NSObject

HttpRequest holds basic information for construction of an HTTP request

  • HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Specify desired method using this parameter.

    Declaration

    Objective-C

    @property (nonatomic) MBXHttpMethod method;
  • url

    URL the request should be sent to

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *url;
  • HTTP headers to include

    Declaration

    Objective-C

    @property (nonatomic, copy, nonnull) NSDictionary<NSString *, NSString *> *headers;
  • Keep compression flag. If set to true, responses will not be automatically decompressed. Default is false.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isKeepCompression) BOOL keepCompression;
  • Timeout defines how long, in seconds, the request is allowed to take in total (including connecting to the host). Default is 0, meaning no timeout.

    Declaration

    Objective-C

    @property (nonatomic, readonly) uint64_t timeout;
  • Restrict the request to the specified network types. If none of the specified network types is available, the download fails with a connection error.

    Default is allowed to all network types

    Declaration

    Objective-C

    @property (nonatomic, readonly) MBXNetworkRestriction networkRestriction;
  • Application and SDK information for generating a User-Agent string.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) MBXUAComponents *uaComponents;
  • HTTP Body data transmitted in an HTTP transaction message immediatelly following the headers if there is any. Body data is used by POST HTTP methods.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSData *body;