cancel
Showing results for 
Search instead for 
Did you mean: 

Rest POST for --data-raw

munish
New Contributor

How can I call below curl command in Rest POST snap

curl --location --request POST ‘localhost:8086/api/v2/write?bucket=mydb&precision=s’ --header ‘Content-Type: application/x-www-form-urlencoded’ --data-raw ‘mem,host=test’

Pls advice?

1 REPLY 1

igormicev
Contributor

Hi @munish

Take a look at this post Rest Post with attachment and form data where @lazo.ilijoski explains how to use the REST Post snap.

For your curl you need to put the --location in “Service URL*”, the --data in “HTTP entity”, params and headers go in the “Query parameters” and “HTTP header” sections of the snap. If you need to attach a file, then it’s explained in the post.

/Igor