title: Adding content-type header to Angular $http request
body: <p>I'm trying to send HTTP request using the following code:</p>
  
  <pre><code>var editCompanyUrl = 'http://X.X.X.X:YYYY/editCompany';
  var userId = localStorage.getItem("UserId");
  var token = localStorage.getItem("Token");
  var companyId = localStorage.getItem("companyId");
  
  return $http({
  method: 'POST',
  url: editCompanyUrl,
  params: {
     token: token,
     userId: userId,
     companyId: companyId,
     companyName: $scope.companyName,
     },
     timeout: 500
     }).then(function (data) {
              console.log(data);
              //Store Company ID which is used for saving purposes
              //localStorage.setItem("companyId", data.data.Company.id);
              return data.data.Company;
          }, function (data) {
              console.log(data);
          })
  </code></pre>
  
  <p>and handler of the request on the server side accepts requests with Content-Type: multipart/form-data. How can I add this content type to the request? I've tried many advices and tips from tutorials but no success. Could you please help me? In addition to it - what should I do when I will add a file with an image to this request? Can I just add it as additional parameter of the request?</p>
  
  <p>Thank you very much!</p>