Adding functionality to an ASP application to call REST APIs

This is an example of a real project requirement. It gives an overview of the requirements and solution rather than any specific coding.

The requirement was to write some functions to make remote API calls using REST and HTTP. The APIs were used to control BitCoin transactions.

The main part of the project was to pick through the documentation for the APIs to identify the commands that had to be used and the parameters used in the requests and responses.

The coding was relatively simple, once the requirements were identified. The WinHttp.WinHTTPRequest component was used to make the HTTP calls. JSON was used for some of the data but it was sufficiently simple to construct the strings as required and search within the response content to find the required properties.

The end result was an include file containing the functions needed to make the API calls from the existing application.

Quick Links

Details of freelance programming. Go back to the page describing the availability of bespoke programming services.

Example 1 - An example of importing data into Excel using VBA.

Example 1 - An example of importing data into Excel using VBA.

 

 

© Chestysoft, 2018.

function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function AcceptCookies() { createCookie("cookie-site","true",120); createCookie("cookie-tracking","true",120); createCookie("cookie-remarketing","true",120); document.getElementById("overlay").style.display = "none"; } ]]>

Cookies

This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.