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

Request method 'GET' not supported #37

Closed
sid326 opened this issue Apr 30, 2018 · 5 comments
Closed

Request method 'GET' not supported #37

sid326 opened this issue Apr 30, 2018 · 5 comments
Labels

Comments

@sid326
Copy link

sid326 commented Apr 30, 2018

In our application, we have one messaging system which has the functionality to send, receive and update the messages. Whenever a user wants to send a message he requests that to our Rest server send method which is of the type RequestMethod.POST. In send method, we saved the messages in DB. But when I tried replacing my current DB to cosmosDb(SQL API) then I am getting an error as "Request method 'GET' not supported"(Status code 405). Are we using GET type internally in createDocument method?? We can't change the type of our method to GET, but for testing purposes, I have changed my method type to GET its working as expected.
As per my understanding inserting or creating a document is POST type and fetching will be of type GET.

@moderakh
Copy link
Contributor

@sid326 you seem to not be using the SDK provided by this github repo. am I right? Please use the SDK and you don't have to be dealing with details.

@sid326
Copy link
Author

sid326 commented May 1, 2018

@moderakh correct previously I was not using the SDK provided by GitHub repository, but I have also tried the same thing with the Github repo SDK also. Still getting the same error. If I define my method in rest server of type method as RequestMethod.POST which use to send a new request which ends up with creating a new instance in DB it's throwing me an error stating "Request method 'GET' not supported"(Status code 405)".

@sid326
Copy link
Author

sid326 commented May 2, 2018

@moderakh I got what making Post request to GET request its not on cosmos side its the part of my application. I was testing only the backend part which was discarding the type of method so it was trying to convert my method from POST to the GET type. Thanks for the support. :)

@moderakh
Copy link
Contributor

moderakh commented May 2, 2018

@sid326 if you use the SDK you don't have to deal with POST and GET in interacting with cosmos db.
So can I assume your issue is resolved and close this?

@sid326
Copy link
Author

sid326 commented May 2, 2018

Yes, sure I'll give a try with SDK also.You can close the issue as it is resolved. Thanks for the support.

@moderakh moderakh closed this as completed May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants