mirror of
https://github.com/gethomepage/homepage.git
synced 2025-07-09 03:04:18 -04:00
Remove inaccurate POST examples from authoring docs
This commit is contained in:
parent
1147fc858f
commit
352c54ecc4
@ -225,20 +225,8 @@ const widgetExample = {
|
||||
|
||||
#### `method`
|
||||
|
||||
The `method` property is a string that represents the HTTP method that should be used to make the API request. The default value is `GET`.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
method: "POST",
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
The `method` represents the HTTP method that should be used to make the API request. The default value is `GET`. Note that `POST` requests are not allowed via the
|
||||
widget API and require the use of a custom proxy.
|
||||
|
||||
#### `headers`
|
||||
|
||||
@ -251,7 +239,6 @@ const widgetExample = {
|
||||
// `/api/stats`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
@ -271,7 +258,6 @@ const widgetExample = {
|
||||
// `/api/graphql`
|
||||
stats: {
|
||||
endpoint: "graphql",
|
||||
method: "POST",
|
||||
body: {
|
||||
query: `
|
||||
query {
|
||||
|
Loading…
x
Reference in New Issue
Block a user