title: Sphinx Autoflask - Differentiate docstrings for GET and POST requests on same function
body: <p>I have a Flask application I am working on building documentation for via python-sphinx. </p>
  
  <p>I am currently using the autoflask extension from <code>sphinxcontrib.autohttp.flask</code> </p>
  
  <p>My question is : How can I prepare a docstring, which properly applies different information to a GET version and POST version of the same route.</p>
  
  <p>For instance a small function :</p>
  
  <pre><code>@app.route('/add_event', methods=['GET', 'POST'])
  def add_event():
      """
      ..http:get:: /add_event
          :return: Test
      ..http:post:: /add_event
          :return: Test2
      """
      if request.method == 'GET':
          # get some things
          person_id = request.args.get('id')
          return render_template('create_event.html', race_event_form=test_form)
      if request.method == 'POST':
          # post some things
  
          return redirect('/person_profile/id/{0}'.format(request.args.get('id')))
  </code></pre>
  
  <p>My current extensions in conf.py</p>
  
  <pre><code>extensions = [
      'sphinx.ext.autodoc',
      'sphinx.ext.ifconfig',
      'sphinx.ext.viewcode',
      'sphinx.ext.githubpages',
      'sphinxcontrib.httpdomain',
      'sphinxcontrib.autohttp.flask',
      'sphinxcontrib.autohttp.flaskqref'
  ]
  </code></pre>
  
  <p>The sphinx output looks like  </p>
  
  <p><a href="https://i.stack.imgur.com/E1FtX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E1FtX.png" alt="enter image description here"></a></p>
  
  <p>Is it possible to right one thing for a GET and another for a POST? Id really like to avoid splitting every function into two separate get / post functions. </p>
  
  <p>Also, is it possible to have autoflask ouput required arguments passed through <code>request.args</code> or <code>request.form</code> like the <code>person_id</code> variable in the GET request ? </p>