文章詳情頁
node.js 的request-promise模塊怎么發(fā)送帶參數(shù)的POST請求啊
瀏覽:176日期:2024-07-22 14:51:48
問題描述
var rp = require(’request-promise’);var options= {method:’post’,uri:'http://192.168.0.37:8084/comments/praise',qs:{id:id},headers:{ ’User-Agent’: ’Request-Promise’},json: true }; rp(options).then(function(data){console.log(data) });
報錯了,麻煩大神看下
問題解答
回答1:https://github.com/request/re...
相關(guān)文章:
1. javascript - react+百度地圖2. html5 - iOS的webview加載出來的H5網(wǎng)頁,怎么修改html標簽select的樣式字體?3. vue.js - vue+webpack+vue-router 部署到nginx服務器下,非根目錄,前后端怎樣配置文件?4. javascript - 為什么當index等于5的時候,不在當前頁面跳轉(zhuǎn)到百度?不跳轉(zhuǎn)的代碼在倒數(shù)第五行5. angular.js - 關(guān)于angular react vue 我們在什么實際的開發(fā)項目中使用?如何選擇?6. 手動啟動mysql服務出錯,1067錯誤,如何解決呢?7. index.php錯誤,求指點8. 這是什么情況???9. 請教一條mysql的sql語句寫法;10. 跟著課件一模一樣的操作使用tp6,出現(xiàn)了錯誤
排行榜

熱門標簽