Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl examples in help page uses POST rather than GET #1190

Closed
snicoll opened this issue Mar 2, 2021 · 2 comments
Closed

curl examples in help page uses POST rather than GET #1190

snicoll opened this issue Mar 2, 2021 · 2 comments
Assignees
Milestone

Comments

@snicoll
Copy link
Contributor

snicoll commented Mar 2, 2021

We should review the examples for curl as it uses -d which triggers a POST and that could give the impression that POST must be used while GET is expected.

@snicoll snicoll added this to the 0.10.1 milestone Mar 2, 2021
@snicoll
Copy link
Contributor Author

snicoll commented Mar 2, 2021

FTR it uses -d for the lack of a better option. The alternative would be to hardcode the parameter in the URL which is a bit ugly. On the other hand, promoting a POST in the examples while we really expect users to use GET is a bit nasty.

Flagging for team attention to see what the rest of the team thinks.

@snicoll snicoll removed this from the 0.10.1 milestone Mar 2, 2021
@snicoll snicoll added this to the 0.10.1 milestone Mar 5, 2021
@snicoll snicoll changed the title curl examples in help page wrongly use -d curl examples in help page uses POST rather than GET Mar 5, 2021
@snicoll
Copy link
Contributor Author

snicoll commented Mar 5, 2021

@wilkinsona found out that using -G together with -d might issue a GET. It does

$ curl -v -G https://start.spring.io/starter.zip -d dependencies=web -d javaVersion=11 -o demo.zip
> GET /starter.zip?dependencies=web&javaVersion=11 HTTP/2
> Host: start.spring.io
> User-Agent: curl/7.64.1
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
< date: Fri, 05 Mar 2021 07:41:56 GMT
< content-type: application/zip
< content-length: 56487
< set-cookie: __cfduid=d3daceb39b71dfe5e4f8a49676860a97a1614930116; expires=Sun, 04-Apr-21 07:41:56 GMT; path=/; domain=.spring.io; HttpOnly; SameSite=Lax; Secure
< content-disposition: attachment; filename="demo.zip"
< via: 1.1 google
< cf-cache-status: DYNAMIC
< cf-request-id: 08a2ef15ba0000d49407b1c000000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< strict-transport-security: max-age=15552000; includeSubDomains
< server: cloudflare
< cf-ray: 62b1b46929dfd494-BRU
<
{ [976 bytes data]
100 56487  100 56487    0     0   224k      0 --:--:-- --:--:-- --:--:--  224k
* Connection #0 to host start.spring.io left intact
* Closing connection 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant