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

This commit is contained in:
Andrew Bastin
2022-04-18 21:37:15 +05:30
parent 100e562dcc
commit 62a5beb52f
3 changed files with 4 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ export class GQLConnection {
.forEach((x) => (finalHeaders[x.key] = x.value)) .forEach((x) => (finalHeaders[x.key] = x.value))
const reqOptions = { const reqOptions = {
method: "post", method: "POST",
url, url,
headers: { headers: {
...finalHeaders, ...finalHeaders,
@@ -213,7 +213,7 @@ export class GQLConnection {
.forEach(({ key, value }) => (finalHeaders[key] = value)) .forEach(({ key, value }) => (finalHeaders[key] = value))
const reqOptions = { const reqOptions = {
method: "post", method: "POST",
url, url,
headers: { headers: {
...finalHeaders, ...finalHeaders,

View File

@@ -50,7 +50,7 @@ const getMethodByDeduction = (parsedArguments: parser.Arguments) => {
R.or(objHasArrayProperty("F", "string")) R.or(objHasArrayProperty("F", "string"))
)(parsedArguments) )(parsedArguments)
) )
return O.some("post") return O.some("POST")
else return O.none else return O.none
} }

View File

@@ -21,7 +21,7 @@ const sendPostRequest = async (url, params) => {
.map((key) => `${key}=${params[key]}`) .map((key) => `${key}=${params[key]}`)
.join("&") .join("&")
const options = { const options = {
method: "post", method: "POST",
headers: { headers: {
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8", "Content-type": "application/x-www-form-urlencoded; charset=UTF-8",
}, },