@@ -36,6 +36,11 @@ not500 = ResponsePredicate "not500" (\resp -> not $ responseStatus resp == statu
37-- This function checks that any @application/json@ responses only return JSON
37-- This function checks that any @application/json@ responses only return JSON
38-- objects (and not arrays, strings, numbers, or booleans) at the top level.
38-- objects (and not arrays, strings, numbers, or booleans) at the top level.
42+-- * JSON Grammar: <https://tools.ietf.org/html/rfc7159#section-2 RFC 7159 Section 2>
43+-- * JSON Grammar: <https://tools.ietf.org/html/rfc4627#section-2 RFC 4627 Section 2>
39onlyJsonObjects :: ResponsePredicate Text Bool
44onlyJsonObjects :: ResponsePredicate Text Bool
40onlyJsonObjects
45onlyJsonObjects
41 = ResponsePredicate "onlyJsonObjects" (\resp -> case decode (responseBody resp) of
46 = ResponsePredicate "onlyJsonObjects" (\resp -> case decode (responseBody resp) of
@@ -66,6 +71,10 @@ getsHaveLastModifiedHeader
67-- This function checks that every @405 Method Not Allowed@ response contains
72-- This function checks that every @405 Method Not Allowed@ response contains
68-- an @Allow@ header with a list of standard HTTP methods.
73-- an @Allow@ header with a list of standard HTTP methods.
77+-- * @Allow@ header: <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html RFC 2616 Section 14.7>
69notAllowedContainsAllowHeader :: ResponsePredicate Text Bool
78notAllowedContainsAllowHeader :: ResponsePredicate Text Bool
70notAllowedContainsAllowHeader
79notAllowedContainsAllowHeader
71 = ResponsePredicate "notAllowedContainsAllowHeader" (\resp ->
80 = ResponsePredicate "notAllowedContainsAllowHeader" (\resp ->