MimePart

open class MimePart : ObjectBase

Encapsulates a MIME part.

  • MIME part headers, or request/response headers if isRequest or isResponse is true.

    Declaration

    Swift

    final public var headers: HTTPHeaders
  • Body part Content-ID for body part in OData change set request/response, otherwise null.

    Declaration

    Swift

    final public var contentID: String?
  • true if this part contains a multipart message (part’s Content-Type is “multipart/mixed; boundary=SomeBoundaryText”).

    Declaration

    Swift

    final public var isMultipart: Bool
  • true if this part contains an HTTP request (part’s Content-Type is “application/http”, and is followed by an HTTP request line).

    Declaration

    Swift

    final public var isRequest: Bool
  • tr`ue if this part contains an HTTP response (part’s Content-Type is “application/http”, and is followed by an HTTP status line).

    Declaration

    Swift

    final public var isResponse: Bool
  • If isRequest is true, then the HTTP method (e.g. “GET”), otherwise empty.

    Declaration

    Swift

    final public var httpMethod: String
  • If isRequest is true, then the request URI (e.g. “/resource”), otherwise empty.

    Declaration

    Swift

    final public var requestURI: String
  • If isResponse is true, then the status code, otherwise zero.

    Declaration

    Swift

    final public var statusCode: Int
  • If isResponse is true, then the status text, otherwise empty.

    Declaration

    Swift

    final public var statusText: String
  • Default initializer.

    Declaration

    Swift

    override public init()
  • MIME part content, or request/response content if isRequest or isResponse is true.

    Declaration

    Swift

    public final var content: MimeStreamReader { get set }