Skip to content

Commit

Permalink
Merge pull request #17 from karelkryda/dev
Browse files Browse the repository at this point in the history
Version 2.0.4 #2
  • Loading branch information
karelkryda authored Apr 10, 2022
2 parents b12b61a + 85897f9 commit a62606b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/UrllibHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {XMLValidator} from "fast-xml-parser";
* @returns Promise
*/
export function createRequest(url: string, headers: IncomingHttpHeaders, secure = true, data = {}, bump = "0", timeout = 10, withBump = false, urllibOptions: RequestOptions = {}): Promise<HttpClientResponse<unknown>> {
headers["user-agent"] = "Mozilla/5.0 (" + process.platform + "; U; " + process.arch + "; en-us) TypeScript/" + process.version + " (KHTML, like Gecko) UniversalSpeedTest/2.0.3";
headers["user-agent"] = "Mozilla/5.0 (" + process.platform + "; U; " + process.arch + "; en-us) TypeScript/" + process.version + " (KHTML, like Gecko) UniversalSpeedTest/2.0.4";
headers["cache-control"] = "no-cache";

return request(((url[0] == ":") ? (secure) ? "https" : "http" : "") + url + ((withBump) ? (((url.includes("?")) ? "&" : "?") + "x=" + performance.now() + bump) : ""), {
Expand Down

0 comments on commit a62606b

Please sign in to comment.