mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 22:40:01 -04:00
add nodejs support
This commit is contained in:
parent
3a2ab40e75
commit
87b887a4b7
13 changed files with 78 additions and 18 deletions
|
@ -193,7 +193,7 @@ class HTTPSession extends CurlSession {
|
|||
if (params.referrer) {
|
||||
params.headers["Referer"] = params.referrer;
|
||||
}
|
||||
if (!params.headers["User-Agent"]) {
|
||||
if (!params.headers["User-Agent"] && typeof navigator === "object") {
|
||||
params.headers["User-Agent"] = navigator.userAgent;
|
||||
}
|
||||
if (body && !params.headers["Content-Type"]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue