We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A resource can be added to another resource and behave as any resource. For example : Resource Person can be added to resource URI company.
(personResource) Get(...) { }
(personResource) Post(...) { }
... resource := CompanyResource personResource := PersonResource
resource.embed("/:companyname/employee",personResource) api.AddResource("/company", resource) api.Start(54666)
View employees of the company named "Huston" should be view at URI /company/ curl http://locahost:54666/huston/employee
The text was updated successfully, but these errors were encountered:
Tested nested resource. No need to add composite resource #6
0918082
There is no need to add extra services to make resource composite. Adding a nested resource to a parent resource URI is easy enough.
Sorry, something went wrong.
No branches or pull requests
A resource can be added to another resource and behave as any resource.
For example :
Resource Person can be added to resource URI company.
(personResource) Get(...) {
}
(personResource) Post(...) {
}
...
resource := CompanyResource
personResource := PersonResource
resource.embed("/:companyname/employee",personResource)
api.AddResource("/company", resource)
api.Start(54666)
View employees of the company named "Huston" should be view at URI /company/
curl http://locahost:54666/huston/employee
The text was updated successfully, but these errors were encountered: