mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
optimize some code
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user