如何使用Spring Boot webclient
以application/x-www-form-urlencoded
格式发布请求,示例curl请求中的内容为`application/x-www-form-urlencoded`。
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=XXXX' \
--data-urlencode 'password=XXXX'
我该如何使用WebClient发送相同的请求?
org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'application/x-www-form-urlencoded' not supported for bodyType=org.springframework.web.reactive.function.BodyInserters$DefaultFormInserter
- LyannicbodyValue
而不是body
。它可行了! - Lyannic