mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 18:18:31 +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:
@@ -654,6 +654,7 @@
|
||||
<label for="httpBodyEncoding" class="form-label">{{ $t("Body Encoding") }}</label>
|
||||
<select id="httpBodyEncoding" v-model="monitor.httpBodyEncoding" class="form-select">
|
||||
<option value="json">JSON</option>
|
||||
<option value="form">x-www-form-urlencoded</option>
|
||||
<option value="xml">XML</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -1002,6 +1003,9 @@ message HealthCheckResponse {
|
||||
</soap:Body>
|
||||
</soap:Envelope>` ]);
|
||||
}
|
||||
if (this.monitor && this.monitor.httpBodyEncoding === "form") {
|
||||
return this.$t("Example:", [ "key1=value1&key2=value2" ]);
|
||||
}
|
||||
return this.$t("Example:", [ `
|
||||
{
|
||||
"key": "value"
|
||||
|
Reference in New Issue
Block a user