How do you use/add/edit Data

So this is the example,

curl --request POST
–url ‘https://test/Test1/Test2/v1/
–header ‘authorization: Basic {{AUTH_HASH}}’
–header ‘content-type: application/json; charset=utf-8’
–data ‘{“saleid”:123456,“price”:500}’

I know how to put the Request URL and the 2 Headers, and I am actually new to Postman. So how do you actually use this line below?

–data ‘{“saleid”:123456,“price”:500}’

I’m no curl expert, but it looks like the -data flag is the Body of the request being POSTed :slight_smile:.

You have a few options for populating your POST request body – form-data, x-www-form-urlencoded, raw, and binary.

I mocked up two POST requests using form-data and raw (JSON), and you can use the Run in Postman button below to download it :slight_smile:.

Run in Postman

Our documentation on Requests has a nice overview of the different ways to populate the request body here – https://www.getpostman.com/docs/postman/sending_api_requests/requests

1 Like