diff options
| author | Gunnar Mills <gmills@us.ibm.com> | 2018-09-10 13:48:55 -0500 |
|---|---|---|
| committer | Gunnar Mills <gmills@us.ibm.com> | 2018-09-13 13:34:49 +0000 |
| commit | d29fb31cce4d46c8311c2891b20d5cbac23023a0 (patch) | |
| tree | 4a28a12e74f751ec1df478fea30c266512afdfaa | |
| parent | 635c9052ad2fa0f970dc6e959840aadd6ea7bcc4 (diff) | |
| download | openbmc-docs-d29fb31cce4d46c8311c2891b20d5cbac23023a0.tar.gz openbmc-docs-d29fb31cce4d46c8311c2891b20d5cbac23023a0.zip | |
Rest Cheatsheet: Remove Content-Type on GET request
There is no "Content-Type" on GET request.
Content-Type is only used with POST and PUT requests. See:
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
Change-Id: Ic927eaaa95aa2eee92791032bc631a1623602e90
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
| -rw-r--r-- | REST-cheatsheet.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/REST-cheatsheet.md b/REST-cheatsheet.md index 7067105..3bd1abb 100644 --- a/REST-cheatsheet.md +++ b/REST-cheatsheet.md @@ -11,14 +11,14 @@ This document is intended to provide a set of REST client commands for OpenBMC u * List and enumerate: ``` - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" https://${bmc}/xyz/openbmc_project/list - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" https://${bmc}/xyz/openbmc_project/enumerate + $ curl -c cjar -b cjar -k https://${bmc}/xyz/openbmc_project/list + $ curl -c cjar -b cjar -k https://${bmc}/xyz/openbmc_project/enumerate ``` * List sub-objects: ``` - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" https://${bmc}/xyz/openbmc_project/ - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" https://${bmc}/xyz/openbmc_project/state/ + $ curl -c cjar -b cjar -k https://${bmc}/xyz/openbmc_project/ + $ curl -c cjar -b cjar -k https://${bmc}/xyz/openbmc_project/state/ ``` * Host soft power off: @@ -102,8 +102,8 @@ This document is intended to provide a set of REST client commands for OpenBMC u - Read: ``` - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod + $ curl -c cjar -b cjar -k -X GET https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + $ curl -c cjar -b cjar -k -X GET https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod ``` - Write: ``` @@ -126,7 +126,7 @@ This document is intended to provide a set of REST client commands for OpenBMC u or ``` - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://${bmc}/xyz/openbmc_project/control/power_supply_redundancy + $ curl -c cjar -b cjar -k -X GET https://${bmc}/xyz/openbmc_project/control/power_supply_redundancy ``` - Write (Enable/Disable): |

