How to Implement a REST API Function

Question: We are trying to interface with RingCentral to send faxes and they require us to upload the file and also send a JSON message at the same time – is there a function that can do this? Answer: The best way to solve such a problem is as follows: 1. Find the Developer Documentation for the REST API in […]

Postman –> cURL –> Generate Chilkat Application Code

Chilkat provies an online tool at https://tools.chilkat.io/curlHttp  to generate application code from a cURL statement. If you have an HTTP/REST request working in Postman, you can get the cURL statement, and then paste the cURL statement into Chilkat’s online tool to generate your application code. Get cURL statement from Postman Request To get the cURL statement from a Postman request, […]

Capturing HTTP Cookies in a POST Response and Sending in Subsequent HTTP POST’s

Question: A particular REST/Web API returns a cookie. I need to capture this cookie and use it when sending subsequent POSTs. For example, this is the CURL statement to login and save the response cookie(s) to a file. curl -c cookies.txt -H “Content-Type: application/json” -X POST -d ‘{“username”:”user”,”password”:”pass”}’ http://192.168.1.1/api/login Then I need to use the cookie when sending an SMS […]

Use CURL to Chilkat Source Code Generator

Question According to the Sonar API documentation at https://docs.sonar.expert/system/api-calls-using-third-party-applications-personal-access-tokens, this is an example of how to run a query to their GraphQL. It looks a little different than your example because all it wants to authenticate is an access token which I already have. Do you have any examples similar to this using vbscript or vb6? curl -X POST \ […]

Calling a REST GET API and Parsing JSON/XML Response

This blog post describes a general procedure for writing code that calls an HTTP/HTTPS GET REST API and parses the JSON or XML response. Step 1: Form the CURL Command A GET request in the form of a CURL command will look like this: curl -X GET https://test-api.service.hmrc.gov.uk/organisations/vat/123456789/obligations \ -H “Accept: application/vnd.hmrc.1.0+json”  \ -H “Authorization: Bearer hmrc_app_server_token” Some notes: Header […]