nodejs發送formdata post請求

var FormData = require('form-data');
var request = require('request');
let form = new FormData(); form.append("taskID", job_id); form.append("Jobname", jobname); form.append("PRD_TYP", business_type); form.append("PRD_NUM", business_product); form.append("saler_img_path", saler_img_path); form.append("customer_img_path", customer_img_path); var request_url = 'http://' + server_host + ':' + server_port + '/createJob'
console.log("request_url ==> ", request_url) form.submit(request_url, function(err, res) { res.resume(); });

 因爲服務端接收的都是formdata數據,nodejs發送formdata post請求.javascript

相關文章
相關標籤/搜索