Загрузка...

GET request not supported in custom API in Business Central. "BadRequest_MethodNotAllowed"

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram: https://www.instagram.com/ky.emrah

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!GET request not supported in custom API in Business Central. "BadRequest_MethodNotAllowed"

I try to call a method in a custom API in a code unit in Ms Dynamics 365 Business Central. I tried everything to make it a simple GET method, but I keep receiving "BadRequest_MethodNotAllowed" in Postman.
Ms Dynamics 365 Business Central
BadRequest_MethodNotAllowed
BadRequest_MethodNotAllowed
The complete response:
{
"error": {
"code": "BadRequest_MethodNotAllowed",
"message": "'GET' requests on unbound actions are not allowed."
}
}

{
"error": {
"code": "BadRequest_MethodNotAllowed",
"message": "'GET' requests on unbound actions are not allowed."
}
}

When I call the method with a POST request (in Postman), it works as expected.
To me it seems absurd the caller of my API need to use POST when het wants to GET some data from my API. This is of course also against official guide lines and conventions.
Am I missing something? Please some advice. Thank you.
POST
GET
Tags: rest,get,dynamics-business-centralSource of the question:
https://stackoverflow.com/questions/78996083

Question and source license information:
https://meta.stackexchange.com/help/licensing
https://stackoverflow.com/

Видео GET request not supported in custom API in Business Central. "BadRequest_MethodNotAllowed" канала Emrah KAYA
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять