LoggerHTTPModel

@objc
public class LoggerHTTPModel : NSObject

Object Model representing a HTTP request

  • The remote URL that the response was sent to

    Declaration

    Swift

    @objc
    public var requestURL: String?
  • URLComponents objcet representing the different components of the `requestURL

    Declaration

    Swift

    @objc
    public var requestURLComponents: URLComponents?
  • Array of URLQueryItem‘s appended onto the requestURL

    Declaration

    Swift

    @objc
    public var requestURLQueryItems: [URLQueryItem]?
  • HTTP method that the request used to connect to the remote

    Declaration

    Swift

    @objc
    public var requestMethod: String?
  • Cache policy used to fetch/store the request and its corresponding response

    Declaration

    Swift

    @objc
    public var requestCachePolicy: String?
  • The date that the request was executed

    Declaration

    Swift

    @objc
    public var requestDate: Date?
  • The time that the request was executed

    Declaration

    Swift

    @objc
    public var requestTime: String?
  • The timeout of the response

    Declaration

    Swift

    @objc
    public var requestTimeout: String?
  • The headers that were sent with the response

    Declaration

    Swift

    @objc
    public var requestHeaders: [AnyHashable : Any]?
  • The length of the body that was sent with the request

    Declaration

    Swift

    public var requestBodyLength: Int?
  • The type of the request that was made eg: application/x-protobuf

    Declaration

    Swift

    @objc
    public var requestType: String?
  • A String representation of this request formatted as a cURL request

    Declaration

    Swift

    @objc
    public var requestCurl: String?
  • The response code returned from the server for this request

    Declaration

    Swift

    public var responseStatus: Int?
  • The type of the response that was sent eg: application/x-protobuf

    Declaration

    Swift

    @objc
    public var responseType: String?
  • The date that the response was received

    Declaration

    Swift

    @objc
    public var responseDate: Date?
  • The time that the response was received

    Declaration

    Swift

    @objc
    public var responseTime: String?
  • The headers that were received with the response

    Declaration

    Swift

    @objc
    public var responseHeaders: [AnyHashable : Any]?
  • The length of the body that was sent with the request

    Declaration

    Swift

    public var responseBodyLength: Int?
  • The time that the request took to execute, from sending the payload/request to receiving a response

    Declaration

    Swift

    public var requestDuration: Float?
  • A random hash value representing the request

    Declaration

    Swift

    @objc
    public var randomHash: NSString?
  • The short type of the response represented as a string value

    Declaration

    Swift

    @objc
    public var shortType: String
  • A Bool value representing whether or not the request hung/finalised with no response

    Declaration

    Swift

    @objc
    public var noResponse: Bool
  • Undocumented

    Declaration

    Swift

    @objc
    public func getRequestBody() -> NSString
  • Undocumented

    Declaration

    Swift

    @objc
    public func getResponseBody() -> NSString
  • Undocumented

    Declaration

    Swift

    @objc
    public func getResponseBodyDictionary() -> [String : [String : Any]]
  • Undocumented

    Declaration

    Swift

    @objc
    public func getRandomHash() -> NSString
  • Undocumented

    Declaration

    Swift

    @objc
    public func getRequestBodyFilepath() -> String
  • Undocumented

    Declaration

    Swift

    @objc
    public func getRequestBodyFilename() -> String
  • Undocumented

    Declaration

    Swift

    @objc
    public func getResponseBodyFilepath() -> String
  • Undocumented

    Declaration

    Swift

    @objc
    public func getResponseBodyFilename() -> String
  • Undocumented

    Declaration

    Swift

    @objc
    public func getDocumentsPath() -> String
  • Undocumented

    Declaration

    Swift

    @objc
    public func saveData(_ dataString: NSString, toFile: String)
  • Undocumented

    Declaration

    Swift

    @objc
    public func readRawData(_ fromFile: String) -> Data?
  • Undocumented

    Declaration

    Swift

    @objc
    public func getTimeFromDate(_ date: Date) -> String?
  • Undocumented

    Declaration

    Swift

    public func getShortTypeFrom(_ contentType: String) -> HTTPModelShortType
  • Undocumented

    Declaration

    Swift

    public func prettyPrint(_ rawData: Data, type: HTTPModelShortType) -> NSString?
  • Undocumented

    Declaration

    Swift

    @objc
    public func formattedRequestLogEntry() -> String
  • Undocumented

    Declaration

    Swift

    @objc
    public func formattedResponseLogEntry() -> String