Forum Discussion

munish's avatar
munish
New Contributor
5 years ago

Rest POST for --data-raw

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

  • 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