2
0
鏡像自 https://github.com/therootcompany/request.js synced 2025-07-01 20:36:34 +00:00

query string support #3

已關閉
建立於 2020-02-28 12:09:06 +00:00 由 Ghost · 4 comment

There's a useQuerystring: false in index.js, but not really any query string support.

I would say that handling query strings is a an expected feature as much as forms and well deserving a few lines.

There's a `useQuerystring: false` in index.js, but not really any query string support. I would say that handling query strings is a an expected feature as much as forms and well deserving a few lines.
擁有者

That option is leftover and had to do with querystring vs qs vs url.

Query strings should just be part of the URL path as per usual.

What did you try that didn’t work?

That option is leftover and had to do with `querystring` vs `qs` vs `url`. Query strings should just be part of the URL path as per usual. What did you try that didn’t work?
作者

I don't have the code at hand but requests supports a qs object and it will do the proper encoding and concatenation. That's more readable IMHO.

FYI I ended up rewriting some code and use axios, this was just a nuisance, take this issue as a suggestion. The showstopper were timeouts, in my tests on Node timeout did not do anything.

I don't have the code at hand but requests supports a `qs` object and it will do the proper encoding and concatenation. That's more readable IMHO. FYI I ended up rewriting some code and use axios, this was just a nuisance, take this issue as a suggestion. The showstopper were timeouts, in my tests on Node `timeout` did not do anything.
擁有者

In what way does it accept a qs object? Can you show me an example?

In what way does it accept a qs object? Can you show me an example?
擁有者

Since I never got an example of what the code looks like, and I don't know what the issue is, I'm closing this out.

Since I never got an example of what the code looks like, and I don't know what the issue is, I'm closing this out.
coolaj86 關閉了這個問題 2020-04-21 05:58:28 +00:00
登入 才能加入這對話。
未選擇標籤
2 參與者
通知
截止日期
未設定截止日期。
先決條件

未設定先決條件。

參考: root/request.js#3
No description provided.