Skip to content
New issue

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

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

Already on GitHub? # to your account

Undefined Create method on REST service does not generate 405 #99

Closed
kkogan opened this issue Dec 31, 2014 · 2 comments · Fixed by #100
Closed

Undefined Create method on REST service does not generate 405 #99

kkogan opened this issue Dec 31, 2014 · 2 comments · Fixed by #100

Comments

@kkogan
Copy link

kkogan commented Dec 31, 2014

Testing the behavior of doing a POST to an endpoint without a create method, it hangs (times out in the mocha test) instead of responding with a 405.
Reproduce by doing a post instead of a delete in the 'throws a 405 for undefined service methods' section of the rest test file.
Inspecting the 'todo' service on the app at that point indicates that there is a create method, even though only get and find are configured.
Am I missing something?

@daffl
Copy link
Member

daffl commented Dec 31, 2014

I bet this is happening because of Uberproto.create. So technically the converted service object still has a create method it just doesn't do the right thing (and never calls a callback which is why it times out). This should be easily fixable though by checking if the original service object has a .create method. I will have a look at it in a bit.

daffl pushed a commit that referenced this issue Aug 21, 2018
daffl pushed a commit that referenced this issue Aug 21, 2018
daffl pushed a commit that referenced this issue Aug 21, 2018
* Updating client use example

* Remove client use since it has been moved to a different module
daffl pushed a commit that referenced this issue Aug 22, 2018
* Updating client use example

* Remove client use since it has been moved to a different module
daffl pushed a commit that referenced this issue Aug 25, 2018
daffl pushed a commit that referenced this issue Aug 29, 2018
Ten hours is only 36 seconds
daffl pushed a commit that referenced this issue Aug 29, 2018
Ten hours is only 36 seconds
@lock
Copy link

lock bot commented Feb 8, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 8, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants