mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 08:23:46 +08:00
Add only xml support to http monitors
This commit is contained in:
@@ -251,16 +251,13 @@ class Monitor extends BeanModel {
|
||||
|
||||
let contentType = null;
|
||||
let bodyValue = null;
|
||||
|
||||
|
||||
if (this.body && !this.httpBodyEncoding || this.httpBodyEncoding === "json") {
|
||||
bodyValue = JSON.parse(this.body);
|
||||
contentType = "application/json";
|
||||
} else if (this.body && (this.httpBodyEncoding === "xml")) {
|
||||
bodyValue = this.body;
|
||||
contentType = "text/xml";
|
||||
} else if (this.body && (this.httpBodyEncoding === "form")) {
|
||||
bodyValue = this.body;
|
||||
contentType = "application/x-www-form-urlencoded";
|
||||
contentType = "text/xml; charset=utf-8";
|
||||
}
|
||||
|
||||
const options = {
|
||||
|
Reference in New Issue
Block a user