RequestBodyEncoding

public enum RequestBodyEncoding: String

Body dictionary encoding to use for service requests.

  • JSON encoding: Content-type application/json

    Declaration

    Swift

    case json = "application/json"
  • Form encoding: Content-type application/x-www-form-urlencoded

    Declaration

    Swift

    case form = "application/x-www-form-urlencoded"
  • For the given encoding, returns the correct key/value pair for a Content-type request header.

    Declaration

    Swift

    public func headerItem()-> (key: String, value: String)