title: how to check in flask whether a variable parameter is passed in url or not?
body: <p>for example the url is : <code>http://localhost:5000/create/user/&lt;int:id&gt;</code></p>
  <p>I want to check whether the user has passed the <strong>id</strong> parameter or not.</p>
  <p>I have done this.</p>
  <pre><code>@app.route('/create/user/&lt;int:id&gt;')
  def create_user(id=None):
      if id is None:
           return jsonify({'message':'Bad request'})
  </code></pre>
  <p>for example</p>
  <ol>
  <li><code>http://localhost:5000/create/user/23</code></li>
  <li><code>http://localhost:5000/create/user/</code></li>
  </ol>
  <p>In the <strong>1</strong> url the user has provided the value of id=23 so we will procedd but in the url <strong>2</strong>, the user has not provided any value for <strong>id</strong> parameter, so we will throw some kind of error.</p>
  <p>I want to know, how to implement such functionality.</p>