Skip to content

Commit 00b8990

Browse files
authored
Update README.md
1 parent ad923e5 commit 00b8990

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,37 @@ ReactDOM.render(<App />, document.getElementById('root'));
4646

4747
## Options:
4848

49-
url : _string_
49+
### GET
50+
```
51+
useFetch({
52+
url: "https://jsonplaceholder.typicode.com/todos/1"
53+
})
54+
```
55+
56+
### POST
57+
```
58+
useFetch({
59+
url: "https://jsonplaceholder.typicode.com/posts",
60+
method: "POST",
61+
body: JSON.stringify({
62+
"userId": 1,
63+
"id": 1,
64+
"title": "sunt aut facere",
65+
"body": "quia et suscipit"
66+
})
67+
})
68+
```
69+
70+
### HEADERS
71+
```
72+
useFetch({
73+
url: "https://jsonplaceholder.typicode.com/posts",
74+
headers: {
75+
'Accept': 'application/json',
76+
'Content-Type': 'application/json'
77+
}
78+
})
79+
```
5080

5181
## License:
5282

0 commit comments

Comments
 (0)