How to write to php post / get request to the server? The following lines were given in the API instructions as an example:
--- BEGIN --- POST http://example.com/api/Authorization/CreateAuthToken HTTP / 1.1
Content-Length: 38 Content-Type: application / json; charset = utf-8
{"Login": "login", "Password": "password"}
--- END ---
It is not clear what to do with it. (googled .. a bunch of examples, but did not find a complete answer, in php is very weak.)
It is planned in response to receive an authorization code and use it already in a get request for authorization on the server: GET api/integration/v1/inn/<inn>/kkts?AuthToken='код авторизации' Then you can get a request to get the data I need :GET api/integration/v1/inn/<inn>/kkts Answers are assumed in JSON format.
Help please write the server code in php for the task.
Thank.