title: Flask: How do I set the status code in Response
body: <p>Everything runs fine, API(flask) returns the data nicely. However, when I try to customise the response code, I can't do it.<br>
  Following are the two ways, I tried:</p>
  
  <pre><code>from flask import make_response
  dictionary = {1:'a', 2:'b'}
  resp = make_response(dictionary,1001)
  return resp
  
  #In developer tools, I could see the data, but status-code is 200
  </code></pre>
  
  <p>.</p>
  
  <pre><code>from flask import Response
  dictionary = {1:'a', 2:'b'}
  resp = Response(dictionary, status = 1001)
  return resp
  
  #Here again, I see the data, but the status code is 200
  </code></pre>
  
  <p>How do I set the status code to be something else?</p>