Skip to content

Commit

Permalink
🐼🧄 Updated with Glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Glitch (json-xml-wdc) committed Oct 2, 2023
1 parent 8e565e7 commit dfc844e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ app.post("/proxy/*", async (req, res) => {
let options = {
method: req.body.method,
};
if (req.body.postBody && req.body.postBody != null && req.body.postBody !== undefined) options.body = JSON.stringify(req.body.postBody)
if (req.body.method == "POST" && req.body.postBody && req.body.postBody != null && req.body.postBody !== undefined) options.body = JSON.stringify(req.body.postBody)
options["headers"] = req.body.headers || {};

if (req.body.username) {
Expand Down
2 changes: 1 addition & 1 deletion views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<button class="secondary" onclick="_addHeader()">Add Header +</button>
<br />
<p class="smallTitle">POST Body</p>
<textarea id="post_body" rows="7" cols="50" placeholder="{id: 45}"></textarea>
<textarea id="post_body" rows="7" cols="50" placeholder="{&quot;id_num&quot;: 45}"></textarea>
</div>
<div id="dragdrop" class="dragdrop">
<b>Or</b> drag & drop a JSON/XML file here
Expand Down

0 comments on commit dfc844e

Please sign in to comment.