Skip to content

Commit

Permalink
Update User Guide
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Apr 7, 2022
1 parent 6cdb4a7 commit 303df3e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
16 changes: 0 additions & 16 deletions documentation.md

This file was deleted.

38 changes: 38 additions & 0 deletions guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ HTTP Client
Aplus Framework HTTP (HyperText Transfer Protocol) Client Library.

- `Installation`_
- `Usage`_
- `Conclusion`_

Installation
------------
Expand All @@ -16,3 +18,39 @@ The installation of this library can be done with Composer:
.. code-block::
composer require aplus/http-client
Usage
-----

The HTTP Client library is very simple and powerful which can be used as follows:

.. code-block:: php
use Framework\HTTP\Client\Client;
use Framework\HTTP\Client\Request;
$client = new Client();
$request = new Request('https://domain.tld/profile');
$request->setMethod('POST');
$request->setBasicAuth('johndoe', 'abc123');
$request->setJson(['name' => 'John Doe']);
$response = $client->run($request);
echo $response->getStatus();
echo $response->getBody();
Conclusion
----------

Aplus HTTP Client Library is an easy-to-use tool for, beginners and experienced,
PHP developers.
It is perfect for building, simple and full-featured, HTTP interactions.
The more you use it, the more you will learn.

.. note::
Did you find something wrong?
Be sure to let us know about it with an
`issue <https://gitlab.com/aplus-framework/libraries/http-client/issues>`_.
Thank you!

0 comments on commit 303df3e

Please sign in to comment.