-fix node http invocation
This commit is contained in:
parent
a906263f74
commit
42741e5583
@ -36,7 +36,8 @@
|
|||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
"#twrpc-impl": {
|
"#twrpc-impl": {
|
||||||
"node": "./lib/twrpc-impl.node.js"
|
"node": "./lib/twrpc-impl.node.js",
|
||||||
|
"qtart": "./lib/twrpc-impl.qtart.js"
|
||||||
},
|
},
|
||||||
"#compat-impl": {
|
"#compat-impl": {
|
||||||
"node": "./lib/compat.node.js",
|
"node": "./lib/compat.node.js",
|
||||||
|
@ -97,7 +97,7 @@ export class HttpLibImpl implements HttpRequestLibrary {
|
|||||||
const options: RequestOptions = {
|
const options: RequestOptions = {
|
||||||
protocol: parsedUrl.protocol,
|
protocol: parsedUrl.protocol,
|
||||||
port: parsedUrl.port,
|
port: parsedUrl.port,
|
||||||
host: parsedUrl.host,
|
host: parsedUrl.hostname,
|
||||||
method: method,
|
method: method,
|
||||||
path: parsedUrl.pathname,
|
path: parsedUrl.pathname,
|
||||||
headers: opt?.headers,
|
headers: opt?.headers,
|
||||||
@ -148,7 +148,7 @@ export class HttpLibImpl implements HttpRequestLibrary {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (reqBody) {
|
if (reqBody) {
|
||||||
req.write(reqBody);
|
req.write(new Uint8Array(reqBody));
|
||||||
}
|
}
|
||||||
req.end();
|
req.end();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user