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

Establish a non-conventional path for a POST #181

Closed
billc opened this issue Oct 14, 2013 · 3 comments
Closed

Establish a non-conventional path for a POST #181

billc opened this issue Oct 14, 2013 · 3 comments

Comments

@billc
Copy link

billc commented Oct 14, 2013

I have a server with non-conventional ReST POST paths. How can I establish a collection_path specific for POST operations.

Example:

For POSTing a comment "activities/:activity_id/comment"
For POSTing an account "account/:client_id", where client id is supplied in the URL

@pencil
Copy link
Collaborator

pencil commented Oct 15, 2013

her is designed for RESTful APIs. I don't think we should break with this and add the complexity to deal with non-RESTful APIs.

@billc
Copy link
Author

billc commented Oct 15, 2013

Doing some added research, I found Issue 176 that exhibits the desired behavior for example 2 above. For example 1, I am testing using the collection_path but my obstacle is it only should apply to the POST operation.

I agree with your comment @pencil. Although, I don't want to introduce non-resource oriented APIs I've gone so far with Her. I am just checking to see if there are options to work around that I have not seen yet.

@pencil
Copy link
Collaborator

pencil commented Oct 15, 2013

Yes, currently you probably have the behaviour you are looking for. But only because of the bug described by #176. This is not by design and will (hopefully) change in the future 😄

You could fallback to post_raw, put_raw, ... to achieve the behaviour you are looking for. Doing so in a global base model all other models inherit from would probably be the cleanest solution.

Closing this for now as there are no plans to make her compatible with non-RESTful APIs.

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