HTTP
서버에 접근할 때 simple request인 경우
Socratone
2020. 4. 18. 16:18
다음의 조건들을 모두 갖출 때 simple request가 요청되고
그렇지 않은 경우에는 preflighted request가 요청돼 OPTIONS 메소드를 보내게 된다.
1. GET, HEAD, POST 메소드일 때
2. 아래의 헤더일 때
accept
accept-language
content-language
content-type
DPR
downlink
save-data
viewport-width
width
3. content-type 헤더를 쓸 경우에는 아래의 값만 허용된다.
application/x-www-form-urlencoded
multipart/form-data
text/plain
4. request에서 쓰는 XMLHttpRequestUpload 객체에 이벤트 리스너가 등록되면 안 된다.
5. request에서 readableStream 객체가 사용되면 안 된다.