title: how to send api_key and api_secret arguments in jquery post request
body: <pre><code>$.ajax({
          type: 'POST',
          url: 'http://apius.faceplusplus.com/detection/detect',
          crossDomain: true,
          cache: false,
          async: true,
          data: '{ "comment" }',
          dataType: 'jsonp',
          success: function(responseData) {
             alert(JSON.stringify(responseData));
          },
          error: function (responseData, textStatus, errorThrown) {
              alert(JSON.stringify(responseData));
          }
      });
  </code></pre>
  
  <p>I am sending a post request to above which requires <code>api_key</code> and <code>api_secret</code> parameters for authentication. I tried sending value of this 2 paramenters like this in above request:</p>
  
  <pre><code>headers: 
  {
      "Authorization": "Basic " + Base64.encode('value of api key here' + ":" + 'value of api secret here') 
  },
  </code></pre>
  
  <p>But when I execute the request it says 400 BAD REQUEST and when I hit the url in browser it shows</p>
  
  <blockquote>
    <p>{
        "error": "MISSING_ARGUMENTS: api_key", 
        "error_code": 1004
    }</p>
  </blockquote>
  
  <p>Please suggest me a solution. I am stuck for long time.</p>