Skip to content

Commit

Permalink
📝 updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Jun 2, 2021
1 parent f4f923e commit 4f0b491
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- markdownlint-disable no-inline-html -->
<p align="center">
<br><br>
<img src="https://leaf-docs.netlify.app/images/logo.png" height="100"/>
<h1 align="center">Leaf HTTP Fetch</h1>
<br><br>
<br><br>
<img src="https://leaf-docs.netlify.app/images/logo.png" height="100"/>
<h1 align="center">Leaf HTTP Fetch</h1>
<br><br>
</p>

# Leaf Fetch
Expand All @@ -12,7 +12,7 @@
[![Total Downloads](https://poser.pugx.org/leafs/leaf/downloads)](https://packagist.org/packages/leafs/leaf)
[![License](https://poser.pugx.org/leafs/leaf/license)](https://packagist.org/packages/leafs/leaf) -->

Clean, simple, developer friendly interface for making network requests with PHP. Fetch is based on curl and uses elements from Unirest PHP and an API that closely resembles Axios. ALl of these combined makes Fetch the best and simplest way to make PHP network requests.
Clean, simple, developer friendly interface for making network requests with PHP. Fetch is based on curl and uses elements from Unirest PHP and an API that closely resembles Axios. All of these combined makes Fetch the best and simplest way to make PHP network requests.

## fetch example

Expand Down Expand Up @@ -113,6 +113,22 @@ echo json_encode($res);

### shortcut methods

The fetch class comes with shortcut methods named after http methods `get`, `post`, `put`, `patch`, ...

```php
$res = Fetch::post("/posts", [
"title" => "foo",
"body" => "bar",
"userId" => 2,
]);

$res = Fetch::get("/todos/10");

Fetch::delete("/todos/10");

// ...
```

## View Leaf's docs [here](https://leafphp.netlify.app/#/)

Built with ❤ by [**Mychi Darko**](https://mychi.netlify.app)

0 comments on commit 4f0b491

Please sign in to comment.