servant/servant-docs/golden/comprehensive.md
2019-09-29 14:18:13 +03:00

7.9 KiB

GET /

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /alternative/left

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /alternative/right

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /capture/:foo

Captures:

  • foo: Capture foo Int

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /capture-all/:foo

Captures:

  • foo: Capture all foo Int

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /capture-lenient/:foo

Captures:

  • foo: Capture foo Int

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /description

foo

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /flag

GET Parameters:

  • foo
    • Description: QueryFlag
    • This parameter is a flag. This means no value is expected to be associated to this parameter.

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /foo

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /get-int

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):

17

GET /header

Headers:

  • This endpoint is sensitive to the value of the foo HTTP header.

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /header-lenient

Headers:

  • This endpoint is sensitive to the value of the bar HTTP header.

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /http-version

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /is-secure

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /named-context

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /param

GET Parameters:

  • foo
    • Values: 1, 2, 3
    • Description: QueryParams Int

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /param-lenient

GET Parameters:

  • bar
    • Values: 1, 2, 3
    • Description: QueryParams Int

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /params

GET Parameters:

  • foo
    • Values: 1, 2, 3
    • Description: QueryParams Int
    • This parameter is a list. All GET parameters with the name foo[] will forward their values in a list to the handler.

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


POST /post-int

Response:

  • Status code 204

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):

17

POST /post-no-content

Response:

  • Status code 204

  • Headers: []

  • No response body

GET /raw

Response:

  • Status code 200

  • Headers: []

  • No response body

GET /remote-host

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /req-body

Request:

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):

17

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /req-body-lenient

Request:

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):

17

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /res-headers

Response:

  • Status code 200

  • Headers: [("foo","17")]

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /streaming

Request:

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • No response body

GET /summary

foo

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):


GET /vault

Response:

  • Status code 200

  • Headers: []

  • Supported content types are:

    • application/json;charset=utf-8
    • application/json
  • Example (application/json;charset=utf-8, application/json):