HTTP Headers
The HTTP Headers used by this API were implemented using the standards provided from the HTTP 1.1 specification RFC2616
Request Headers
Accept : type/subtype
- Example - Accept :
application/xml
- Notes - Defaults to
application/xml
if one is not passed in, and when a user sends application/* the resulting content sub type will be XML. Multiple types/sub types can be sent in but as per the specification the first match in degree of specificity will be the first used.
i.e. if user sends in: application/, application/xml, */ the order would be as follows:
application/xml
application/*
*/*
- Acceptable values -
application/xml
,application/json
,application/xsd
,application/help
- If an invalid value is passed in via Accept header the response will result in a 415 Unsupported Media Type
Accept-Charset : charset
- Example - Accept-Charset: utf-8
- Notes - Accept-Charset will not be used and will always default to utf-8
Accept-Encoding : encoding
- Example - Accept-Encoding : deflate
- Notes - If none is sent in then the API will default to no compression.
- Acceptable values - deflate, compress, gzip
- If an invalid value is passed in via Accept-Encoding header the response will result in a 406 Not acceptable
Authorization : credentials
- Example - Authorization : OAuth realm=https://churchcode.fellowshiponeapi.com/v1
- Notes - This is where the OAuth credentials will go
Date : HTTP-date
- Example - Date: Thu, 29 Jan 2009 15:28:25 GMT
- Notes - Optional, most commonly passed in with PUTs and POSTs
Response Headers
Allow : method
- Example - Allow: GET, PUT
- Notes - An Allow header field MUST be present in a 405 (Method Not Allowed) response.
- Return values - GET, PUT, POST, DELETE
Content-Encoding : content-coding
- Example - Content-Encoding : gzip
- Notes - This will tell the client what type of compression was used on the resource
- Return values - deflate, compress, gzip
Content-Length : DIGIT
- Example - Content-Length : 1254
- Notes - Sent back with each request. Will possibly be available via HEAD requests
Content-Location : absoluteURI | relativeURI
- Example - Content-Location : https://churchcode.fellowshiponeapi.com/v1/People/22114944
- Notes - Sent back with each GET request
Content-Type : media-type
- Example - Content-Type : application/xml, utf-8
- Notes - Details the type of content being returned to the client
Date : HTTP-date
- Example - Date: Thu, 29 Jan 2009 15:28:25 GMT
- Notes - Will be returned with every response, possibly excluding responses returning status codes of 500
Location : absoluteURI
- Example - Location: https://churchcode.fellowshiponeapi.com/v1/People/22114944
- Notes - Applies to 201 and 301 only
WWW-Authenticate : challenge
- Example - WWW-Authenticate : OAuth realm: https://churchcode.fellowshiponeapi.com/v1
- Notes - The URI will change per environment, per version