Application Programming Interface using JSON

Application Programming Interface using JSON

Categorised in:

I was asked to develop an Application Programming Interface (API) that would allow a remote user to send a request to a remote server, which then performs some actions or lookups and returns an answer.

The simplest way to do this was to use JavaScript Object Notation, or JSON.

What the local site does is send a JSON request using JavaScript to the API. This uses a PHP script to interpret the request, perform security validations and send back the answer. The local device therefore needs to be able to interpret the answer.

Examples are best in this situation: UPS Runtime API. This is entirely in html and JavaScript. TBH jQuery is probably a better choice but just in case there were issues here the example is pure JS.

One response to “Application Programming Interface using JSON”

  1. […] is a comprehensive readme file available and the example by the […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Tagged with , ,

Available Tags

api barcode ean13 finder foreach functions json oscommerce php programming sudoku themes webp wordpress