MCPcopy
hub / github.com/socketio/socket.io / addCookies

Method addCookies

packages/engine.io-client/lib/globals.node.ts:95–106  ·  view source on GitHub ↗
(xhr: any)

Source from the content-addressed store, hash-verified

93 }
94
95 public addCookies(xhr: any) {
96 const cookies = [];
97
98 for (const [name, cookie] of this.cookies) {
99 cookies.push(`${name}=${cookie.value}`);
100 }
101
102 if (cookies.length) {
103 xhr.setDisableHeaderCheck(true);
104 xhr.setRequestHeader("cookie", cookies.join("; "));
105 }
106 }
107
108 public appendCookies(headers: Headers) {
109 for (const [name, cookie] of this.cookies) {

Callers 5

_createMethod · 0.80
socket.io.min.jsFile · 0.80
socket.io.jsFile · 0.80
AMethod · 0.80

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected