Skip to content

Commit

Permalink
Use application/x-www-form-urlencoded post request
Browse files Browse the repository at this point in the history
  • Loading branch information
clydebarrow committed Dec 22, 2024
1 parent 6cb0eaa commit 1898e5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/v2/src/esp-entity-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ export class EntityTable extends LitElement implements RestAction {
restAction(entity: entityConfig, action: string) {
fetch(`${basePath}/${entity.domain}/${entity.id}/${action}`, {
method: "POST",
body: "true",
headers:{
'Content-Type': 'application/x-www-form-urlencoded'
},
}).then((r) => {
console.log(r);
});
Expand Down
4 changes: 3 additions & 1 deletion packages/v3/src/esp-entity-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ export class EntityTable extends LitElement implements RestAction {
restAction(entity: entityConfig, action: string) {
fetch(`${this._basePath}/${entity.domain}/${entity.id}/${action}`, {
method: "POST",
body: "true",
headers:{
'Content-Type': 'application/x-www-form-urlencoded'
},
}).then((r) => {
console.log(r);
});
Expand Down

0 comments on commit 1898e5d

Please sign in to comment.