title: python flask send data through post and url
body: <p>I have a question regarding sending data via a CURL through POST and sending data through the URL. More generally, I have a flask route</p>
  
  <pre><code>@app.route('/create', methods=['POST'])
  def clone:
     ...
  </code></pre>
  
  <p>How can I also send data using a URL? I want to do something like this: </p>
  
  <pre><code>&lt;my-server&gt;:port/create/arg1/arg2/arg3
  </code></pre>
  
  <p>I just figured out you can do something like</p>
  
  <pre><code>@app.route('/create', methods=['POST'])
  @app.route('/create/&lt;op&gt;/&lt;source&gt;/&lt;target&gt;', methods=['GET'])    
  def clone(op = None, source = None, target = None):
      ...
  </code></pre>
  
  <p>Which will work. Is this a good approach?</p>