XHRResult

public struct XHRResult : Decodable

Represents the result of an asynchronous request XMLHttpRequest (XHR) captured. It provides detailed information about the XHR request and its response.

  • Enumerates the possible types of responses that an XHR request can produce, matching the JavaScript XHR API response types.

    See more

    Declaration

    Swift

    public enum ResponseType : String, Decodable
  • The HTTP status code of the XHR response.

    Declaration

    Swift

    public var status: Int
  • The body of the XHR response, represented as a String. The actual format of this string depends on the responseType.

    Declaration

    Swift

    public var body: String
  • A string representing the headers of the XHR response. This string could be parsed further to extract individual header values.

    Declaration

    Swift

    public var headers: String
  • url

    The URL to which the XHR request was made.

    Declaration

    Swift

    public var url: String
  • The type of the response, indicating how the response body is interpreted and what format it is in.

    Declaration

    Swift

    public var responseType: ResponseType