Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Request Doesn't Allow For All Methods #12

Open
nlovelace opened this issue Apr 12, 2021 · 2 comments
Open

Manual Request Doesn't Allow For All Methods #12

nlovelace opened this issue Apr 12, 2021 · 2 comments

Comments

@nlovelace
Copy link

Attempting to send a manual request using 'PATCH' method. The error returned states 'Unsupported Media Type'. As you can see from my code below, I'm sending a templated string as my body. Otherwise there is no other media.

const descr = folder_description: ${data.project_number} | ${data.project_stage.name.toUpperCase()};

egnyte.API.manual.sendRequest(
{
url: ${egn_url}/pubapi/v1/fs${path},
headers: {},
params: {},
method: "PATCH",
body: descr,
},
function (error) {
if (error === null) {
console.log("Description Updated.");
} else {
console.log(error);
}
});

@naugtur
Copy link
Collaborator

naugtur commented Apr 13, 2021

Could you point to the public API documentation of the action/endpoint you're trying to use? I didn't memorize the entire API surface, but I don't recall using a patch for anything.
As for the error - unsupported media type means content-type doesn't have an acceptable value.

@nlovelace
Copy link
Author

nlovelace commented Apr 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants