superagent

    0熱度

    1回答

    我正在嘗試使用superagent和create-react-app引導程序。我收到錯誤: 錯誤./src/ToDoApp.js 模塊未找到:[CaseSensitivePathsPlugin] node_modules\superagent\lib\client.js與磁盤上的相應路徑不匹配 - 文件不存在。 我導入模塊: import request from 'superagent'; i

    0熱度

    2回答

    我試圖寫一個基本的測試,以確保我的minio安裝正常工作。我寫了一個測試,使用presigned POST policy的例子,它工作得很好,但我似乎無法創建一個presigned PUT的工作示例。我得到了403 Forbidden,原因是: cause="Signature does not match" source="[objecthandlers.go:468:objectAPIHan

    1熱度

    1回答

    我正在使用superagent(儘管願意爲用戶其他節點lib),目標是單獨獲取重定向的url,但不是主體。後者是矯枉過正,我想阻止我的代碼下載身體,如果我可以幫助它。 我不能使用HEAD請求,因爲這些不能保證在服務器上啓用。 相反,我的想法是管道superagent響應一個writeStream和停止接收第一個數據的writeStream。但是,.on('data', fn)僅適用於讀取流而不是寫

    1熱度

    1回答

    嘗試測試Auth0 API修補程序請求以修改user_metadata。 使用摩卡和superagent進行測試。 獲取成功,但做一個補丁有用戶ID,並在摩卡測試文件不起作用發送 .send({ "metadata": { "nickname": "Jill" } }) 。 router.patch('/:id', function(req, res, next) { var opt

    0熱度

    1回答

    我注意到,每次我想用superagent運行節點測試時,我都在寫http://localhost。 import superagent from 'superagent'; const request = superagent.agent(); request .get('http://localhost/whatever') .end((err, res) => { .

    0熱度

    1回答

    我將SuperAgent到API的數據返回到控制檯,但我用這2個錯誤 迎接這是我使用的代碼: componentDidMount() { console.log("Did mount"); const url = 'https://api.goodzer.com/products/v0.1/search_stores/?query=v-neck+sweater&lat=40

    0熱度

    1回答

    我需要幫助,試圖使用superagent將項目上傳到API。 單個上傳中項目的限制爲500.因此,如果我要發送超過500個項目,例如,如果上傳大小爲500,我必須將請求分成3個單獨的請求。 我已經打破了請求,但現在我想知道如何向API發出多個請求。 任何想法如何使用superagent鏈接?我已經研究了多部分上傳,但我不知道這是否是同樣的事情。

    0熱度

    2回答

    我試圖在'superagent'的請求中更改我的狀態,但console.log的結果是未定義的。大家可以幫我嗎? componentDidMount(){ var self = this; Request.get('https://api.navitia.io/v1/coverage/fr-idf/stop_areas/stop_area%3AOIF%3ASA%3A5949

    0熱度

    1回答

    所以我想用winston來記錄我的應用程序所做的所有請求。我通過superagent讓所有API請求,我基本上要建立某種類似中間件: // Global error middleware superagent.on('request', req => winston.log(req)) 然後在另一個文件,導入superagent正常和它的工作: import superagent from

    0熱度

    1回答

    以下是我的index.js文件 我試圖從體育數據API獲取迴應。我可以毫不費力地解決捲曲請求,但是當我嘗試以這種方式進行時,我收到了禁止的403錯誤。 var express = require('express'); var config = require("../config.js"); var superagent = require("superagent"); var route