(url2, opts = {})
| 25917 | } |
| 25918 | exports2.json = json; |
| 25919 | function req(url2, opts = {}) { |
| 25920 | const href = typeof url2 === "string" ? url2 : url2.href; |
| 25921 | const req2 = (href.startsWith("https:") ? https3 : http4).request(url2, opts); |
| 25922 | const promise = new Promise((resolve, reject) => { |
| 25923 | req2.once("response", resolve).once("error", reject).end(); |
| 25924 | }); |
| 25925 | req2.then = promise.then.bind(promise); |
| 25926 | return req2; |
| 25927 | } |
| 25928 | exports2.req = req; |
| 25929 | } |
| 25930 | }); |
nothing calls this directly
no test coverage detected