title: Request authorization in flask
body: <p>I am developing a Flask application which gives call to the REST service developed in Flask. The target REST service method is secured using Basic Authentication. I found that for this type of authentication, I have to use base64 encoding.
  I am trying to pass the credentials to the service in this way:</p>
  
  <pre><code>headers = {'username': base64.b64encode(g.user['username'])}
  response = requests.post('http://127.0.0.1:3000/api/v1.0/follower/' + username, headers=headers)
  </code></pre>
  
  <p>And at the service side, the username is fetched as :</p>
  
  <pre><code>user_name = request.authorization.username
  </code></pre>
  
  <p>However, the service is not able to authorize the provided credentials and it is throwing an error 401.
  Is there any issue with the authorization at the service side and at the application side?</p>