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`
|
#### `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`.
|
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.
|
||||||
```js
|
|
||||||
const widgetExample = {
|
|
||||||
api: "{url}/api/{endpoint}",
|
|
||||||
mappings: {
|
|
||||||
// `/api/stats`
|
|
||||||
stats: {
|
|
||||||
endpoint: "stats",
|
|
||||||
method: "POST",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `headers`
|
#### `headers`
|
||||||
|
|
||||||
@ -251,7 +239,6 @@ const widgetExample = {
|
|||||||
// `/api/stats`
|
// `/api/stats`
|
||||||
stats: {
|
stats: {
|
||||||
endpoint: "stats",
|
endpoint: "stats",
|
||||||
method: "POST",
|
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
@ -271,7 +258,6 @@ const widgetExample = {
|
|||||||
// `/api/graphql`
|
// `/api/graphql`
|
||||||
stats: {
|
stats: {
|
||||||
endpoint: "graphql",
|
endpoint: "graphql",
|
||||||
method: "POST",
|
|
||||||
body: {
|
body: {
|
||||||
query: `
|
query: `
|
||||||
query {
|
query {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user