Closed sid326 closed 6 years ago
@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.
@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)".
@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. :)
@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?
Yes, sure I'll give a try with SDK also.You can close the issue as it is resolved. Thanks for the support.
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.