title: send custom access token as http request
body: <p>I am want to connect api with mvc site using oauth authentication.
  for this, i need to send access token through http request as below. </p>
  
  <pre><code>addPostComment: function addPostComment(postid, UserId, comment, accessToken) {
  
                  var request = $http({
                      method: "post",
                      url: apiPath.addPostComment,
                      data: {
                          SocialPostId: postid,
                          CommentDescription: comment,
                          CommentedUserId: UserId,
                          CommentedDate: new Date()
                      },
                      params: {
                          action: "post"
                      },                   
                      beforeSend: function (xhr) {
  
                          xhr.setRequestHeader('Authorization', 'bearer ' + accessToken);
                      }
                  });
                  return (request.then(handleSuccess, handleError));
              }
  </code></pre>
  
  <p>parameter accessToken have value.but while i set as request header, it always says Authrization: Bearer undefined.</p>
  
  <p>Can anyone tell me what is wrong in this code?</p>