Archived Forum Post

Index of archived forum posts


post image file to

Apr 24 '14 at 15:16

I'm trying to find the right syntax to post an image file to using Chilkat.http. Below is the sample code from the site.

curl -X POST -H "X-Parse-Application-Id: ${APPLICATION_ID}" -H "X-Parse-REST-API-Key: ${REST_API_KEY}" -H "Content-Type: image/jpeg" --data-binary '@myPicture.jpg'

Anyone have experience doing this sort of thing?


  1. Use SynchronousRequest
  2. Set the HttpRequest.HttpVerb = "POST"
  3. HTTP Request headers (-H) are added via the HttpRequest.AddHeader method.
  4. Set the HttpRequest.ContentType = "image/jpeg"
  5. Load the JPG file into the HttpRequest's body via the LoadBodyFromFile or LoadBodyFromBytes method.
  6. Set the HttpRequest.Path equal to the path part of the URL, which is "/files/pic.jpg"
  7. The args passed to SynchronousRequest are the domain, port, sslFlag, and httpRequestObject. The domain is "", the port is 443, the sslFlag = true.