Commits

Hong Minhee committed ba8a4b7

Add :reqheader: and :resheader: flag options

Comments (0)

Files changed (2)

httpdomain/doc/index.rst

       :query sort: one of ``hit``, ``created-at``
       :query offset: offset number. default is 0
       :query limit: limit number. default is 30
+      :reqheader Accept: the response content type depends on
+                         :mailheader:`Accept` header
+      :reqheader Authorization: optional OAuth token to authenticate
+      :resheader Content-Type: this depends on :mailheader:`Accept`
+                               header of request
       :statuscode 200: no error
       :statuscode 404: there's no user
 
        :query sort: one of ``hit``, ``created-at``
        :query offset: offset number. default is 0
        :query limit: limit number. default is 30
+       :reqheader Accept: the response content type depends on
+                          :mailheader:`Accept` header
+       :reqheader Authorization: optional OAuth token to authenticate
+       :resheader Content-Type: this depends on :mailheader:`Accept`
+                                header of request
        :statuscode 200: no error
        :statuscode 404: there's no user
 
 
    .. versionadded:: 1.1.8
 
+``requestheader``, ``reqheader``
+   Description of request header field.
+
+   .. versionadded:: 1.1.9
+
+``responseheader``, ``resheader``
+   Description of response header field.
+
+   .. versionadded:: 1.1.9
+
 ``statuscode``, ``status``, ``code``
    Description of response status code.
 
       :type post_id: int
       :form email: author email address
       :form body: comment body
+      :reqheader Accept: the response content type depends on
+                         :mailheader:`Accept` header
+      :reqheader Authorization: optional OAuth token to authenticate
+      :resheader Content-Type: this depends on :mailheader:`Accept`
+                               header of request
       :status 302: and then redirects to :http:get:`/posts/(int:post_id)`
       :status 400: when form parameters are missing
 
        :type post_id: int
        :form email: author email address
        :form body: comment body
+       :reqheader Accept: the response content type depends on
+                          :mailheader:`Accept` header
+       :reqheader Authorization: optional OAuth token to authenticate
+       :resheader Content-Type: this depends on :mailheader:`Accept`
+                                header of request
        :status 302: and then redirects to :http:get:`/posts/(int:post_id)`
        :status 400: when form parameters are missing
 
 `````````````
 To be released.
 
+- Added ``:reqheader:`` and ``:resheader:`` option flags.
+
 
 Version 1.1.8
 `````````````

httpdomain/sphinxcontrib/httpdomain.py

                      names=('formparameter', 'formparam', 'fparam', 'form')),
         GroupedField('jsonparameter', label='Json Parameters',
                      names=('jsonparameter', 'jsonparam', 'json')),
+        GroupedField('requestheader', label='Request Headers',
+                     rolename='mailheader',
+                     names=('reqheader', 'requestheader')),
+        GroupedField('responseheader', label='Response Headers',
+                     rolename='mailheader',
+                     names=('resheader', 'responseheader')),
         GroupedField('statuscode', label='Status Codes',
                      rolename='statuscode',
                      names=('statuscode', 'status', 'code'))