You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl -X GET http://example.com/api/resource \
-H "Accept: application/json"
-X GET: Specifies the HTTP GET request (optional as curl defaults to GET).
-H "Accept: application/json": Requests a JSON response by setting the Accept header.
These are examples of the client posting and therefore they would have to correctly return the data in either YAML or JSON format.
GET Command Returning YAML
Example using curl:
curl -X GET http://example.com/api/resource \
-H "Accept: application/x-yaml"
-H "Accept: application/x-yaml": Requests a YAML response by setting the Accept header to application/x-yaml.
kanjoe24
changed the title
Task: KVP: upgrade to support creation of kvp data
Task: KVP: upgrade to retrieve kvp data in user requested format
Jan 20, 2025
Goal
Example code for creation of data using libyaml.
Example output to stdout
Output the list to memory in a specific format.
GET Command Returning JSON
Example using curl:
Example JSON Response:
Examples from the client side
These are examples of the client posting and therefore they would have to correctly return the data in either YAML or JSON format.
GET Command Returning YAML
Example using curl:
Example YAML Response:
GET Command returning JSON
curl -X GET http://example.com/api/resource?format=json
Reponse Expected
The text was updated successfully, but these errors were encountered: