Skip to content

Commit 959c1c8

Browse files
committed
Add example in README
1 parent 8de1f9a commit 959c1c8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
**Send easily HTTP status codes to the browser.**
44

5+
## 🪄 Usage - Examples
56

67
```php
8+
use PH7\PhpHttpResponseHeader\Header;
79

10+
Http::setHeaders(200); // Sends "200 OK" header to the browser
811

9-
```
1012

13+
// ...
14+
15+
Http::setHeaders(404); // Sends "404 Not Found" to the browser
16+
17+
// ...
1118

19+
Http::setHeaders(400); // Sends "400 Bad Request" to the browser
20+
21+
// and so on ...
22+
```
1223

1324
## 🧑‍🍳 Who made this...?
1425

0 commit comments

Comments
 (0)