Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

chore: update 'post' method usages to be uppercased as per HTTP spec

Andrew Bastin62a5beb52f1e
diff --git a/packages/hoppscotch-app/helpers/GQLConnection.ts b/packages/hoppscotch-app/helpers/GQLConnection.ts
index 9c002a093..0f9bdf581 100644
--- a/packages/hoppscotch-app/helpers/GQLConnection.ts
+++ b/packages/hoppscotch-app/helpers/GQLConnection.ts
@@ -149,7 +149,7 @@ export class GQLConnection {
.forEach((x) => (finalHeaders[x.key] = x.value))
const reqOptions = {
- method: "post",
+ method: "POST",
url,
headers: {
...finalHeaders,
@@ -213,7 +213,7 @@ export class GQLConnection {
.forEach(({ key, value }) => (finalHeaders[key] = value))
const reqOptions = {
- method: "post",
+ method: "POST",
url,
headers: {
...finalHeaders,
diff --git a/packages/hoppscotch-app/helpers/curl/sub_helpers/method.ts b/packages/hoppscotch-app/helpers/curl/sub_helpers/method.ts
index 5a2648e40..ba0e4f274 100644
--- a/packages/hoppscotch-app/helpers/curl/sub_helpers/method.ts
+++ b/packages/hoppscotch-app/helpers/curl/sub_helpers/method.ts
@@ -50,7 +50,7 @@ const getMethodByDeduction = (parsedArguments: parser.Arguments) => {
R.or(objHasArrayProperty("F", "string"))
)(parsedArguments)
)
- return O.some("post")
+ return O.some("POST")
else return O.none
}
diff --git a/packages/hoppscotch-app/helpers/oauth.js b/packages/hoppscotch-app/helpers/oauth.js
index 66654156d..f686bd97e 100644
--- a/packages/hoppscotch-app/helpers/oauth.js
+++ b/packages/hoppscotch-app/helpers/oauth.js
@@ -21,7 +21,7 @@ const sendPostRequest = async (url, params) => {
.map((key) => `${key}=${params[key]}`)
.join("&")
const options = {
- method: "post",
+ method: "POST",
headers: {
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8",
},