Inquiline 0.3.2

Inquiline 0.3.2

TestsTested
LangLanguage SwiftSwift
License BSD
ReleasedLast Release Mar 2016
SPMSupports SPM

Maintained by Kyle Fuller.


Downloads

Total77
Week0
Month0

Installs

Apps14
Pod Tries2
Test Targets3
powered by Segment

GitHub

Stars25
Watchers3
Forks12
Issues1
Contributors4
Pull Requests1

Code

Files4
LOCLines of Code 323


Inquiline 0.3.2

Inquiline

Collection of utilities to aid use of the Nest Web Server Gateway Interface. Provides a RequestType and ResponseType implementation.

Request

Inquiline provides an implementation of RequestType.

let request = Request(method: "GET", path: "/", headers: nil, body: nil)

RequestType

Inquiline extends RequestType to provide a convinience header subscript and also header accessors:

request["Content-Type"]
request.host
request.contentType
request.contentLength
request.accept
request.authorization
request.cacheControl

Response

Inquiline provides an implementation of ResponseType.

let response = Response(.Ok, contentType: "plain/text", body: "Hello World")
HTTP/1.1 200 OK
Content-Type: plain/text
Content-Length: 11

Hello World

Subscripting headers

response["Cache-Control"] = "no-cache"
response.contentType = "application/json"
response.cacheControl = "no-cache"

Installation

pod 'Inquiline'

License

Inquiline is released under the BSD license. See LICENSE.