optimize some code

This commit is contained in:
killer069
2021-09-14 22:11:02 +05:30
parent 9ed0048792
commit 9a777e30ff
2 changed files with 3 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ interface RequestOpts extends RequestOptions{
method? : "GET" | "POST"
}
async function https_getter(req_url : string, options : RequestOpts = {}): Promise<IncomingMessage>{
function https_getter(req_url : string, options : RequestOpts = {}): Promise<IncomingMessage>{
return new Promise((resolve, reject) => {
let s = new URL(req_url)
options.method ??= "GET"