Archived Forum Post

Index of archived forum posts

Question:

Is there an example for HTTP GET with JSon?

Apr 11 '13 at 13:29

Is there an example for HTTP GET with JSon?


Answer

HTTP GET requests are the same regardless of the type of content being retrieved. The QuickGetStr method sends a GET to retrieve the content at a URL. If the content is HTML, then the QuickGetStr returns the HTML string. If the content is XML, then it returns the XML string. Likewise, if it is JSON, it returns the JSON string.


Answer

FWIW I posted an example for http.QuickGetStr() fetching JSON data here. It shows both the client accessing a url that displays JSON and a url with query parameters for a server script that serves different JOSN data. As well as the server code for clarity. It doesn't differ from chilkat's original answer, it's just an example in case the OP doesn't already know how to use it for HTML or XML returns.