mesos icon indicating copy to clipboard operation
mesos copied to clipboard

Add curl examples to operator-http-api

Open nhandler opened this issue 8 years ago • 4 comments

When reading this document, many people will want to test out the requests against their own environment. Providing curl examples will help assist with this task.

nhandler avatar Jan 12 '18 01:01 nhandler

@nhandler Thanks for doing this! Awesome. Do I take it that you tested all these commands? Also, is the EOF required in all the curl commands?

vinodkone avatar Jan 12 '18 22:01 vinodkone

@nhandler similar to Vinod's comment: I think we could probably get away without the heredoc notation, to get rid of the EOFs?

i.e.:

curl -i \
  -X POST http://<masterhost>:5050/api/v1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '
{
  "type": "GET_HEALTH"
}'

This works when I test it in bash anyway :) I think it makes sense to avoid the EOFs in this context since these are documentation as well as examples, it will help reduce noise and make the essential information easier to identify.

greggomann avatar Jan 16 '18 19:01 greggomann

@nhandler If you can update the PR, I'll commit it ASAP.

vinodkone avatar Jan 18 '18 18:01 vinodkone

@nhandler we were reviewing PRs today and came across this one - do you have a cycle to update real quick?

greggomann avatar Aug 27 '18 17:08 greggomann