Mojo::Leds::Rest - Abstract class for RESTFul webservices interface
version 1.11
PUT /url/
create a new record
Parameters:
body JSON - {col1: ..., col2:... }
{col1: ..., col2:... }
Return:
Created record in JSON {_id:...., col1:. ...., }
{_id:...., col1:. ...., }
GET /url/id
return a single record with _id: id
None
Record found in JSON {_id:...., col1:. ...., }
PUT /url/id
update a single record
body JSON - {_id:...., col1: new_value, col2: new_value, }
{_id:...., col1: new_value, col2: new_value, }
Updated record in JSON {_id:...., col1:. ...., }
DELETE /url/id
delete a record
Empty body
HTTP Status: 204 No Content
204 No Content
GET /url/
return all records
All records in JSON array: [ {_id:...., }, {_id:...., }, ...} ]
[ {_id:...., }, {_id:...., }, ...} ]
POST /url/
update/creare multi records. Record with _id is updated, record without _id is created.
body JSON array: [ {col1,... }, {_id:...., col1: new_value, col2: new_value, } ]
[ {col1,... }, {_id:...., col1: new_value, col2: new_value, } ]
Created/ Updated record in JSON [{_id:...., col1:. ...., }, ...]
[{_id:...., col1:. ...., }, ...]
Emiliano Bruni <info@ebruni.it>
This software is copyright (c) 2021 by Emiliano Bruni.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Mojo::Leds, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::Leds
CPAN shell
perl -MCPAN -e shell install Mojo::Leds
For more information on module installation, please visit the detailed CPAN module installation guide.