๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ–ฅ๏ธํ”„๋ก ํŠธ์—”๋“œ/HTML | CSS | JAVASCRIPT

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - XMLHttpRequest ์ฟ ํ‚ค ๊ฐ’๋„ ํ•จ๊ป˜ ๋ณด๋‚ด๊ธฐ

by Janger 2021. 11. 17.
728x90
๋ฐ˜์‘ํ˜•

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials

 

XMLHttpRequest.withCredentials - Web APIs | MDN

The XMLHttpRequest.withCredentials property is a boolean value that indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. Setting withCredentials has

developer.mozilla.org

 

var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com/', true);
xhr.withCredentials = true;
xhr.send(null);

 

xhr.withCredentials = true;

send ํ•˜๊ธฐ ์ด์ „์—, ์œ„์˜ ํ•œ ์ค„์„ ์ถ”๊ฐ€ํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. 

728x90
๋ฐ˜์‘ํ˜•