0
이 예제를 보자컬은 폼을 보낼 때 Content-Type에 덧붙입니다. 이것을 무시하는 방법은 무엇입니까?
curl http://host.compute-1.amazonaws.com:8080/oauth2/token -H "Content-Type: application/x-www-form-urlencoded" -F 'grant_type=password' -F 'username=test-user' -F 'password=password' -F 'client_id=test_application_client_id' -F 'client_secret=password' -v
하나는 Content-Type
이 application/x-www-form-urlencoded
로 설정 될 것이라고 생각합니다. 대신 Curl이 전송 application/x-www-form-urlencoded; boundary=------------------------5f55da42226c00e5
이 아닌 방법은입니까? 컬 맨 페이지에서
[email protected] ~/ $ curl http://something.compute-1.amazonaws.com:8080/oauth2/token -H "Content-Type: application/x-www-form-urlencoded" -F 'grant_type=password' -F 'username=test-user' -F 'password=password' -F 'client_id=test_application_client_id' -F 'client_secret=password' -v
* Trying 0.0.0.0...
* TCP_NODELAY set
* Connected to something.compute-1.amazonaws.com (0.0.0.0) port 8080 (#0)
> POST /oauth2/token HTTP/1.1
> Host: something.compute-1.amazonaws.com:8080
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 598
> Expect: 100-continue
> Content-Type: application/x-www-form-urlencoded; boundary=------------------------5f55da42226c00e5
>
< HTTP/1.1 100 Continue
< HTTP/1.1 400 Bad Request
< Server: Apache-Coyote/1.1
< Date: Wed, 13 Dec 2017 00:43:13 GMT
< Content-Type: text/plain
< Content-Length: 145
< Connection: close
<
* Closing connection 0
WebApplicationException has been caught, status: 400, message: The Content-Type header is missing on this request you should define: Content-Type