Choosing the right HTTP client
If you already have an HTTP client or don't need any help choosing one, you can skip this step.
To use our web API, you have to send a message to our server over the internet. This requires to use a specific protocol: HTTP(S).
Most languages come with native functions to make use of this protocol.
Some generic libraries based on these native functions aim to make it easier to send HTTP requests and handle HTTP responses. Some of these libraries even support specific formats (XML, JSON, etc.).
Companies, like SlimPay, may develop specific libraries to make it even easier to use their specific service or API.
So to sum it up we have 4 levels:
(as an example)
|Level 1||Native functions||You should not be using this unless there is no generic library (level 2) for your language.||
|Level 2||Generic library||The right choice if you don't want to keep installing specific libraries for each web service you use. Although this may require some added effort from you to use the specific format used by each service unless it is supported by the library.||Guzzle|
|Level 3||Specific library for a service||The best choice if you want to go faster in your implementation of a specific service. It will take care of the technical layer for you and you only have to implement your business logic.||HAPI Client|
|Level 4||Plug-and-play solution||It uses a level 2 or 3 library and on top of that, it already implements a business logic adapted to the project it is made for (CMS, shop, etc.).||See our partners|
Note: the HTTP client is the application sending the HTTP request. Per extension, the generic or specific libraries (level 2/3) are also called HTTP clients.
Now back to us and the best choice when working with SlimPay:
- Java: HAPI Client for Java (level 3)
- PHP: HAPI Client for PHP (level 3)
- Other languages: you can take a look at the specific clients (level 3) developed by our community or choose a generic client for your language (just type <language> http client in your favorite search engine).
If you didn't already, install the chosen HTTP client by following the instructions provided. Once you're all set, you can move to the next step.