login about faq

Here is a cURL line used to retrieve data from a JSON Get: curl --user SomeUser:SomePassword -H "Content-Type: application/json" -X GET https://SomeServer/queue/19/jsonEditorApi.do -o "C:Program Files (x86)Microsoft Visual StudioVB98QueueMetricsqueue.txt"

-H, --header <header>

-o, --output <file> (Instead of -o, would like text be returned into a string 'ChilkatHttpResponse')

-X, --request <command> (HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request method will be used instead of the method otherwise used (which defaults to GET).

asked Oct 04 at 16:14

IraH's gravatar image


A GET request has no request body, and therefore the Content-Type header is meaningless. (A Content-Type header only makes sense if the request has a body, such as for a POST. A GET request never has a body.) Therefore, the Content-Type header can (and should) be omitted.

That leaves just the HTTP basic authentication. Setting the Chilkat.Http.Login and Chilkat.Http.Password properties is the equivalent of "-user SomeUser:SomePassword".

To duplicate the above request, set the Login and Password properties, and then call Chilkat.Http.QuickGetStr("https://SomeServer/queue/19/jsonEditorApi.do"), which returns the response body text.


answered Oct 04 at 18:20

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Oct 04 at 16:14

Seen: 68 times

Last updated: Oct 04 at 18:20

powered by OSQA