h*0.0      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw0.1.0.0 Safe-Inferred")*/179<servant-quickcheckUse x instance for y Since 0.0.0.0servant-quickcheck ByteString x! instance over the response body. Since 0.0.0.0servant-quickcheck Equality as z. This means that if two bodies are equal as JSON (e.g., insignificant whitespace difference) they are considered equal. Since 0.0.3.0   Safe-Inferred")*/179< !"#$%&'() #$!"%&'() Safe-Inferred")*/0179<0servant-quickcheckThis is the core Servant-Quickcheck generator, which, when given a `Proxy API` will return a pair of { and `Gen a`, where a is a function from   to a  . The {! is a weight for the QuickCheck | function which ensures a random distribution across all endpoints in an API.2servant-quickcheckThis function returns a QuickCheck `Gen a` when passed a servant API value, typically a `Proxy API`. The generator returned is a function that accepts a   and returns a }:, which can then be used to issue network requests. This ~ type makes it easier to compare distinct APIs across different  s.Cservant-quickcheck?capture all path pieces that do not have semantics relevant to 0; this is to maintain backwards compatibility without having to introduce CPP for every new URL piece that basically is irrelevant for this class012201 Safe-Inferred")*/179<"DIservant-quickcheck(A set of predicates. Construct one with  and ^.Mservant-quickcheck>A predicate that depends on both the request and the response. Since 0.0.0.0Pservant-quickcheck.A predicate that depends only on the response. Since 0.0.0.0Sservant-quickcheck  Best Practice500 Internal Server Error should be avoided - it may represent some issue with the application code, and it moreover gives the client little indication of how to proceed or what went wrong.7This function checks that the response code is not 500. Since 0.0.0.0Tservant-quickcheck OptionalThis function checks that the response from the server does not take longer than the specified number of nanoseconds. Since 0.0.2.1Uservant-quickcheck  Best PracticeReturning anything other than an object when returning JSON is considered bad practice, as: it is hard to modify the returned value while maintaining backwards compatibility0many older tools do not support top-level arrayswhether top-level numbers, booleans, or strings are valid JSON depends on what RFC you're going by/there are security issues with top-level arraysThis function checks that any application/json responses only return JSON objects (and not arrays, strings, numbers, or booleans) at the top level. References:JSON Grammar: -https://tools.ietf.org/html/rfc7159#section-2RFC 7159 Section 2JSON Grammar: -https://tools.ietf.org/html/rfc4627#section-2RFC 4627 Section 2 Since 0.0.0.0Vservant-quickcheckOptional?When creating a new resource, it is good practice to provide a Location- header with a link to the created resource. This function checks that every  201 Created response contains a Location header, and that the link in it responds with a 2XX response code to GET requests.This is considered optional because other means of linking to the resource (e.g. via the response body) are also acceptable; linking to the resource in some way is considered best practice. References: 201 Created: 1https://tools.ietf.org/html/rfc7231#section-6.3.2RFC 7231 Section 6.3.2Location header: 1https://tools.ietf.org/html/rfc7231#section-7.1.2RFC 7231 Section 7.1.2 Since 0.0.0.0Wservant-quickcheck OptionalThe  Last-Modified header represents the time a resource was last modified. It is used to drive caching and conditional requests./When using this mechanism, the server adds the  Last-Modified? header to responses. Clients may then make requests with the If-Modified-Since header to conditionally request resources. If the resource has not changed since that date, the server responds with a status code of 304 ( Not Modified) without a response body.The  Last-Modified2 header can also be used in conjunction with the If-Unmodified-Since( header to drive optimistic concurrency.The  Last-Modified date must be in RFC 822 format. References:304 Not Modified: /https://tools.ietf.org/html/rfc7232#section-4.1RFC 7232 Section 4.1Last-Modified header: /https://tools.ietf.org/html/rfc7232#section-2.2RFC 7232 Section 2.2If-Modified-Since header: /https://tools.ietf.org/html/rfc7232#section-3.3RFC 7232 Section 3.3If-Unmodified-Since header: /https://tools.ietf.org/html/rfc7232#section-3.4RFC 7232 Section 3.4 Date format: /https://tools.ietf.org/html/rfc2616#section-3.3RFC 2616 Section 3.3 Since 0.0.2.1Xservant-quickcheck RFC ComplianceWhen an HTTP request has a method that is not allowed, a 405 response should be returned. Additionally, it is good practice to return an Allow* header with the list of allowed methods. This function checks that every 405 Method Not Allowed response contains an Allow- header with a list of standard HTTP methods. Note that servant# itself does not currently set the Allow headers. References:Allow header: 7https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.htmlRFC 2616 Section 14.7 Status 405: 7https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.htmlRFC 2616 Section 10.4.6Servant Allow header issue: 5https://github.com/haskell-servant/servant/issues/489 Issue #489 Since 0.0.0.0Yservant-quickcheck RFC ComplianceWhen a request contains an Accept header, the server must either return content in one of the requested representations, or respond with 406 Not Acceptable. onlyJsonObjects <%> empty Since 0.0.0.0GHILKJMONPRQSTUVWXYZ[\]^_`abSTUVWXYZ[\]PRQMONILKJGH^_`ab^6 Safe-Inferred")*/179<,nservant-quickcheckStart a servant application on an open port, run the provided function, then stop the application. Since 0.0.0.0oservant-quickcheckLike n, but allows passing in a  to the application. Since 0.0.0.0pservant-quickcheck6Check that the two servers running under the provided BaseUrls behave identically by randomly generating arguments (captures, query params, request bodies, headers, etc.) expected by the server. If, given the same request, the response is not the same (according to the definition of == for the return datatype), the $ fails, printing the counterexample.The Int argument specifies maximum number of test cases to generate and run.Evidently, if the behaviour of the server is expected to be non-deterministic, this function may produce spurious failuresNote that only valid requests are generated and tested. As an example of why this matters, let's say your API specifies that a particular endpoint can only generate JSON.  serversEqual. will then not generate any requests with an Accept header _other_ than application/json. It may therefore fail to notice that one application, when the request has Accept: text/html , returns a 406 Not Acceptable' HTTP response, and another returns a  200 Success , but with application/json as the content-type.The fact that only valid requests are tested also means that no endpoints not listed in the API type are tested. Since 0.0.0.0qservant-quickcheck>Check that a server satisfies the set of properties specified.Note that, rather than having separate tests for each property you'd like to test, you should generally prefer to combine all properties into a single test. This enables a more parsimonious generation of requests and responses with the same testing depth.Example usage: goodAPISpec = describe "my server" $ do it "follows best practices" $ do withServantServer api server $ \burl -> serverSatisfies api burl stdArgs (not500 <%> onlyJsonObjects <%> notAllowedContainsAllowHeader <%> mempty) Since 0.0.0.0rservant-quickcheckCheck that a server satisfies the set of properties specified, and accept a Manager' for running the HTTP requests through.See q for more details. nopqrstuv nopqrstuv  Safe-Inferred")*/179<,;IJKLPQRMNO01#$!"GH^qSTUYX\WZ[V]pno2)(%&'b`a_uvrst Safe-Inferred")*/179<-wservant-quickcheck QuickCheck Args& with 1000 rather than 100 test cases. Since 0.0.0.01qSTUYX\WZ[V]^IPQRMNOpnow  1qSTUYX\WZ[V]^IPQRMNOpnow           !"#$$%&'()*+,-..//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTTUVWWXYYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  1servant-quickcheck-0.1.0.0-DCb1ow63W3XLbuDuWkNsV6Servant.QuickCheck$Servant.QuickCheck.Internal.Equality&Servant.QuickCheck.Internal.ErrorTypes)Servant.QuickCheck.Internal.HasGenRequest&Servant.QuickCheck.Internal.Predicates&Servant.QuickCheck.Internal.QuickCheckservant-quickcheckNetwork.Http.ClientRequestServant.QuickCheck.Internal&QuickCheck-2.15-9Syk1RNK6fPLCb1qQS0cyGTest.QuickCheck.TestArgsreplay maxSuccessmaxDiscardRatiomaxSizechatty maxShrinksbase Data.ProxyProxy/servant-client-core-0.20-JRGD8Fgkiu93BDp2MNMIW4Servant.Client.Core.BaseUrlBaseUrl baseUrlScheme baseUrlHost baseUrlPort baseUrlPathSchemeHttpHttpsJsonEqdecode'jsonEqResponseEqualitygetResponseEquality allEquality bodyEquality jsonEqualitycompareDecodedResponses$fMonoidResponseEquality$fSemigroupResponseEquality$fJsonEqByteString$fJsonEqByteString0ServerEqualityFailurePredicateFailure prettyHeaders prettyReq prettyRespprettyServerEqualityFailureprettyPredicateFailure$fExceptionPredicateFailure$fShowPredicateFailure$fShowServerEqualityFailure $fExceptionServerEqualityFailure$fGenericServerEqualityFailure$fGenericPredicateFailure HasGenRequest genRequest runGenRequest$fHasGenRequestTYPE:>$fHasGenRequestTYPE:>0#$fHasGenRequestTYPEWithNamedContext$fHasGenRequestTYPE:>1$fHasGenRequestTYPE:>2$fHasGenRequestTYPE:>3$fHasGenRequestTYPE:>4 $fHasGenRequestTYPENoContentVerb$fHasGenRequestTYPEVerb$fHasGenRequestTYPE:>5$fHasGenRequestTYPE:>6$fHasGenRequestTYPE:>7$fHasGenRequestTYPE:>8$fHasGenRequestTYPE:>9$fHasGenRequestTYPE:>10$fHasGenRequestTYPE:>11$fHasGenRequestTYPE:>12$fHasGenRequestTYPEEmptyAPI$fHasGenRequestTYPE:>13$fHasGenRequestTYPE:<|> JoinPreds joinPreds PredicatesrequestPredicatesresponsePredicatesRequestPredicategetRequestPredicateResponsePredicategetResponsePredicatenot500 notLongerThanonlyJsonObjectscreateContainsValidLocationgetsHaveLastModifiedHeadernotAllowedContainsAllowHeaderhonoursAcceptHeadergetsHaveCacheControlHeaderheadsHaveCacheControlHeader#unauthorizedContainsWWWAuthenticatehtmlIncludesDoctype<%>finishPredicateshasValidHeader isRFC822Date status2XX$fMonoidResponsePredicate$fSemigroupResponsePredicate$fSemigroupRequestPredicate$fMonoidRequestPredicate$fMonoidPredicates$fSemigroupPredicates$fJoinPredsResponsePredicate$fJoinPredsRequestPredicate$fGenericPredicates$fGenericRequestPredicate$fGenericResponsePredicatewithServantServerwithServantServerAndContext serversEqualserverSatisfiesserverSatisfiesMgrserverDoesntSatisfyserverDoesntSatisfyMgr noCheckStatus defManager defaultArgsghc-prim GHC.ClassesEq)http-client-0.7.17-Aa96ONzS8eH84pZk593oAINetwork.HTTP.Client.TypesResponse$aeson-2.2.2.0-1yRZoYMX2Zx4GmH0ZGFka8Data.Aeson.Types.InternalValue GHC.TypesIntTest.QuickCheck.Gen frequencyGenGHC.Basemempty*servant-server-0.20-6gtbTo8X8EBJej92ZhgvsNServant.Server.Internal.ContextContext/hspec-expectations-0.8.4-Dp8PbbxILCI3NH4v4TaSEQTest.Hspec.Expectations Expectation