-
Notifications
You must be signed in to change notification settings - Fork 105
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
node.js: leading slash in the path argument of rest-style api #460
Conversation
node.js/core-services.md
Outdated
@@ -1125,7 +1125,7 @@ srv.patch('/Books',...) --> srv.send('PATCH','/Books',...) | |||
srv.delete('/Books',...) --> srv.send('DELETE','/Books',...) | |||
``` | |||
|
|||
You can also use them as REST-style variants to run queries by omitting the leading slash in the `path` argument, or by passing a reflected entity definition instead. In that case they start constructing *bound* [`cds.ql` query objects](cds-ql), as their [CRUD-style counterparts](#crud-style-api): | |||
Leading slash in the `path` argument results in the same behaviour as in `srv.send()`: `path` is sent to a service unmodified. But you can also use these methods as REST-style variants to run queries by omitting the leading slash in the `path` argument, or by passing a reflected entity definition instead. In that case they start constructing *bound* [`cds.ql` query objects](cds-ql), as their [CRUD-style counterparts](#crud-style-api): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this paragraph is overly complex. Maybe we can simplify but I don't have a good idea atm....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johannes-vogel could you please check the simplified variant?
Co-authored-by: Johannes Vogel <[email protected]>
Co-authored-by: René Jeglinsky <[email protected]>
Co-authored-by: René Jeglinsky <[email protected]>
Co-authored-by: René Jeglinsky <[email protected]>
No description provided.