application/x-www-form-urlencoded POST Request

Jivyy·2022년 3월 23일
0

Content-Type : application/x-www-form-urlencoded 로 요청받은 POST request를 하는데 서버쪽에서 받을때 에러가 발생했다.
나는 a+b 라는 스트링을 보내는데 서버에는 a b로 들어온다고 한다.

encodeURIComponent를 이용해 스트링을 엔코딩해서 보냈더니 서버에서 +를 인식할 수 있는 형태의 데이터가 전달되었다.

application/x-www-form-urlencoded: the keys and values are encoded in key-value tuples separated by '&', with a '=' between the key and the value. Non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead)
Mozilla

Ref : stackoverflow

profile
나만의 속도로

0개의 댓글