前端代码
This commit is contained in:
17
node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js
generated
vendored
Normal file
17
node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import * as XMLHttpRequestModule from "xmlhttprequest-ssl";
|
||||
import { BaseXHR, Request } from "./polling-xhr.js";
|
||||
const XMLHttpRequest = XMLHttpRequestModule.default || XMLHttpRequestModule;
|
||||
/**
|
||||
* HTTP long-polling based on the `XMLHttpRequest` object provided by the `xmlhttprequest-ssl` package.
|
||||
*
|
||||
* Usage: Node.js, Deno (compat), Bun (compat)
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
|
||||
*/
|
||||
export class XHR extends BaseXHR {
|
||||
request(opts = {}) {
|
||||
var _a;
|
||||
Object.assign(opts, { xd: this.xd, cookieJar: (_a = this.socket) === null || _a === void 0 ? void 0 : _a._cookieJar }, this.opts);
|
||||
return new Request((opts) => new XMLHttpRequest(opts), this.uri(), opts);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user