|
@@ -30,6 +30,7 @@ Welcome to the generated API reference.
|
|
|
curl -X GET -G "http://localhost/api/users" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users");
|
|
|
|
|
@@ -46,6 +47,7 @@ fetch(url, {
|
|
|
.then(json => console.log(json));
|
|
|
```
|
|
|
|
|
|
+
|
|
|
> Example response (200):
|
|
|
|
|
|
```json
|
|
@@ -69,6 +71,7 @@ fetch(url, {
|
|
|
curl -X GET -G "http://localhost/api/users/create" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users/create");
|
|
|
|
|
@@ -85,6 +88,7 @@ fetch(url, {
|
|
|
.then(json => console.log(json));
|
|
|
```
|
|
|
|
|
|
+
|
|
|
> Example response (200):
|
|
|
|
|
|
```json
|
|
@@ -108,6 +112,7 @@ fetch(url, {
|
|
|
curl -X POST "http://localhost/api/users" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users");
|
|
|
|
|
@@ -125,6 +130,7 @@ fetch(url, {
|
|
|
```
|
|
|
|
|
|
|
|
|
+
|
|
|
### HTTP Request
|
|
|
`POST api/users`
|
|
|
|
|
@@ -140,6 +146,7 @@ fetch(url, {
|
|
|
curl -X GET -G "http://localhost/api/users/1" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users/1");
|
|
|
|
|
@@ -156,6 +163,7 @@ fetch(url, {
|
|
|
.then(json => console.log(json));
|
|
|
```
|
|
|
|
|
|
+
|
|
|
> Example response (200):
|
|
|
|
|
|
```json
|
|
@@ -179,6 +187,7 @@ fetch(url, {
|
|
|
curl -X GET -G "http://localhost/api/users/1/edit" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users/1/edit");
|
|
|
|
|
@@ -195,6 +204,7 @@ fetch(url, {
|
|
|
.then(json => console.log(json));
|
|
|
```
|
|
|
|
|
|
+
|
|
|
> Example response (200):
|
|
|
|
|
|
```json
|
|
@@ -218,6 +228,7 @@ fetch(url, {
|
|
|
curl -X PUT "http://localhost/api/users/1" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users/1");
|
|
|
|
|
@@ -235,6 +246,7 @@ fetch(url, {
|
|
|
```
|
|
|
|
|
|
|
|
|
+
|
|
|
### HTTP Request
|
|
|
`PUT api/users/{user}`
|
|
|
|
|
@@ -252,6 +264,7 @@ fetch(url, {
|
|
|
curl -X DELETE "http://localhost/api/users/1" \
|
|
|
-H "Accept: application/json"
|
|
|
```
|
|
|
+
|
|
|
```javascript
|
|
|
const url = new URL("http://localhost/api/users/1");
|
|
|
|
|
@@ -269,6 +282,7 @@ fetch(url, {
|
|
|
```
|
|
|
|
|
|
|
|
|
+
|
|
|
### HTTP Request
|
|
|
`DELETE api/users/{user}`
|
|
|
|