GTRKCommonRequestHeaderValues
enum GTRKCommonRequestHeaderValues : String
A list of common request header values provided for conveniency.
If you want to use a header value that is not present here,
then feel free to add it so you can conveniently access it in the future,
or just provide it directly to the requestHeaders
property or to the
add(requestHeader:withValue:)
method.
Example:
let restKit = GTRestKit()
restKit.add(requestHeader: GTRKCommonRequestHeaders.contentType.rawValue,
withValue: GTRKCommonRequestHeaderValues.contentTypeApplicationJSON.rawValue)
// or
restKit.requestHeaders[GTRKCommonRequestHeaders.contentType.rawValue] = GTRKCommonRequestHeaderValues.contentTypeApplicationJSON.rawValue
Available values:
- contentTypeTextPlain: text/plain; charset=utf-8
- contentTypeTextHTML: text/html charset=utf-8
- contentTypeApplicationJSON: application/json
- cacheControlNoCache: no-cache
-
text/plain; charset=utf-8
Declaration
Swift
case contentTypeTextPlain = "text/plain; charset=utf-8"
-
text/html charset=utf-8
Declaration
Swift
case contentTypeTextHTML = "text/html charset=utf-8"
-
application/json
Declaration
Swift
case contentTypeApplicationJSON = "application/json"
-
no-cache
Declaration
Swift
case cacheControlNoCache = "no-cache"