mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 20:54:03 +08:00
Adding x-www-form-urlencoded (#3499)
* Adding x-www-form-urlencoded * Adding example of x-www-form-urlencoding to body. * A bit cleaner. * Update server/model/monitor.js Co-authored-by: Frank Elsinga <frank@elsinga.de> * Update src/pages/EditMonitor.vue Co-authored-by: Frank Elsinga <frank@elsinga.de> * Update src/pages/EditMonitor.vue Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com> * Add simple test --------- Co-authored-by: Anders Kvist <ak@cego.dk> Co-authored-by: Frank Elsinga <frank@elsinga.de> Co-authored-by: Louis Lam <louislam@users.noreply.github.com> Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
@@ -431,6 +431,9 @@ class Monitor extends BeanModel {
|
||||
} catch (e) {
|
||||
throw new Error("Your JSON body is invalid. " + e.message);
|
||||
}
|
||||
} else if (this.httpBodyEncoding === "form") {
|
||||
bodyValue = this.body;
|
||||
contentType = "application/x-www-form-urlencoded";
|
||||
} else if (this.httpBodyEncoding === "xml") {
|
||||
bodyValue = this.body;
|
||||
contentType = "text/xml; charset=utf-8";
|
||||
|
Reference in New Issue
Block a user