Greg Hains Posted August 24, 2020 Posted August 24, 2020 Good morning. I am trying to POST data to a system, and am experiencing difficulty in doing so. In the snippet below, I am easily able to upload the name, sale_price etc, but when it comes to "images" I am unsure how to format the line - whether it be a single image or several images. Could somebody please point me in the right direction for the syntax of such a command? curl -X POST https://example.com/site/products -u consumer_key:consumer_secret -H “Content-Type: application/json” -d ‘{ “name”: “Product name”, “sale_price”: “25.50”, “description”: “Body of text”, “images”: [ { “src”: “http://site.com/images/image1.jpg” }, { “src”: “http://site.com/images/image2.jpg” } ] }’ I have tried a number of versions (admittedly guesses), but could not crack it. Any help is appreciated. :) Greg
Ocean West Posted August 24, 2020 Posted August 24, 2020 May I recommend https://www.geistinteractive.com/2019/11/08/http-request-i-dont-know-how-but-it-works/
comment Posted August 24, 2020 Posted August 24, 2020 See if this helps: https://fmforums.com/topic/106879-curl-options-in-insert-from-url-script-step/?do=findComment&comment=482814&_rid=72594
Greg Hains Posted August 24, 2020 Author Posted August 24, 2020 Good morning Ocean West and Comment. Thankyou for your replies - I will go through these pages and see what I can do. Greg
Recommended Posts
This topic is 1549 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now