티스토리 뷰
공부 (@Deprecated)
[javascript] headers: { 'Authorization': 'Bearer <token>' }
승가비 2022. 11. 23. 22:44728x90
function requestUtils(method, url, body, f, bearer) {
const xhr = new XMLHttpRequest();
xhr.open(method, url, true);
xhr.withCredentials = true;
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
bearer && xhr.setRequestHeader("Authorization", bearer);
xhr.onreadystatechange = function () {
if (this.readyState === XMLHttpRequest.DONE && this.status === 200) {
f(this.response);
}
};
xhr.send(body);
}
https://stackoverflow.com/questions/51506579/sending-authorization-token-bearer-through-javascript
Sending Authorization Token Bearer through Javascript
I'm trying to send a Authorization Token Bearer through Javascript to a REST Endpoint, so i doing in this way: $.ajax( { url: 'http://localhost:8080/resourceserver/protected-no-scope', typ...
stackoverflow.com
728x90
'공부 (@Deprecated)' 카테고리의 다른 글
| [Windows 10] WSL2 (0) | 2022.11.24 |
|---|---|
| [SRE] SLI(Service Level Indicator) & SLO(Service Level Objective) (0) | 2022.11.23 |
| [spark] RpcTimeoutException (0) | 2022.11.23 |
| [k8s] delete pods in namespace (0) | 2022.11.23 |
| [aws] s3 logging & monitoring (CloudWatch, CloudTrail, S3 Access, Trusted Advisor) (0) | 2022.11.23 |
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 테슬라 리퍼럴 코드
- 김달
- 메디파크 내과 전문의 의학박사 김영수
- 테슬라 레퍼럴 코드 확인
- 할인
- 레퍼럴
- 클루지
- 개리마커스
- 테슬라 레퍼럴 적용 확인
- Kluge
- 테슬라 리퍼럴 코드 혜택
- wlw
- 연애학개론
- Bot
- 테슬라 추천
- 모델 Y 레퍼럴
- 인스타그램
- 어떻게 능력을 보여줄 것인가?
- 테슬라 크레딧 사용
- 팔로워 수 세기
- 테슬라
- 유투브
- 테슬라 레퍼럴
- COUNT
- follower
- 모델y
- 테슬라 리퍼럴 코드 생성
- 책그림
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
글 보관함