title: Uploading files Formdata and JSON data in the same request with Angular JS
body: <p>How to combine my two $http.post into single http post?</p>
  
  <pre><code>$scope.myMethod = function(){
      var fd = new FormData();
      angular.forEach($scope.files, function(file){
          fd.append('file', file);
      });
  
      $http.post('my_url', fd, {
          transformRequest: angular.identity,
          headers: {'Content-Type': undefined}
      }).success(function(result){
          console.log(result);
      });
  
      $http.post('my_url', {imgx: $scope.imgx, imgy: $scope.imgy, imgh: $scope.imgh, imgw: $scope.imgw}).success(
          function(data){
          console.log(data);
      });
  }
  </code></pre>
  
  <p>any help is very appreciated, Thank you</p>