Mail: [email protected] Phone: +1(424)231-4091

nsHttpClient

This the object used to perform asynchronous requests to NexoPOS 4.x backend. This is a variant of Axios combined with RxJS, with a customized header and handler. This object is directly available on the "window" object. So you can use it anywhere on a page that uses NexoPOS 4.x headers. Here is how to perform requests.

How To Perform GET/DELETE Requests

For creating a GET request, you need to use the method "get" available on nsHttpClient. You'll use the same strategy for DELETE, but changing the method from "get" to "delete".

How To Perform POST/PUT Requests

For creating a POST request, you need to use the method "post" available on nsHttpClient. However, that method accepts another argument that is the post that should be submitted. You'll use the same strategy to create PUT request, but changing the method "post" to "put".