login about faq

I'm trying to find the right syntax to post an image file to Parse.com using Chilkat.http. Below is the sample code from the Parse.com 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' https://api.parse.com/1/files/pic.jpg

Anyone have experience doing this sort of thing?

asked Apr 22 '14 at 16:34

R%20Hill's gravatar image

R Hill
1233


  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 "api.parse.com", the port is 443, the sslFlag = true.
link

answered Apr 23 '14 at 13:11

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thanks for the help! You definitely pointed me in the right direction.

I'm getting a response now from Parse as a JSON string that says "Error: Unauthorized". I've posted a question on the Parse forum to see if there's something else I'm missing.

Once I have a completely working solution I'll post the VB.NET code here.

Thanks again!

(Apr 24 '14 at 15:16) R Hill
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×26
×4

Asked: Apr 22 '14 at 16:34

Seen: 1,101 times

Last updated: Apr 24 '14 at 15:16

powered by OSQA