Recommend this page to a friend! |
![]() |
Info | Example | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 136 | All time: 9,277 This week: 55![]() |
Version | License | PHP version | Categories | |||
training-server 1.0.0 | MIT/X Consortium ... | 5 | HTTP, PHP 5, Libraries, Web services |
<?php |
TrainingServer contains several REST endpoints e.q. with oAuth/basic authentication, which you can use for learning RestControl.
make build
make first-run
make start
# Run all tests
make run-tests
(GET) http://IP_ADDR/plain/users
Sample response:
[
[
"id": 1,
"name": "Sample name",
"email": "sample@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
[
"id": 2,
"name": "Sample name",
"email": "another@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
]
(GET) http://ID_ADDR/plain/files/csv (GET) http://ID_ADDR/plain/files/css (GET) http://ID_ADDR/plain/files/js (GET) http://ID_ADDR/plain/files/png (GET) http://ID_ADDR/plain/cookies
(GET) http://IP_ADDR/basi-auth
Sample response:
[
"status": "ok"
]
(POST) http://IP_ADDR/oauth2/token
> Form params: > - grant_type(optional): password, client_credentials > - client_id: string > - client_secret: string > - username: string > - password: string > - scope(optional): string > > Seeds: > - Password grant client > - client_id: 10 > - client_secret: F0NVue12qNwayx3pKJLHfJmQouOZg40YZafjjdHZ
(GET) http://ID_ADDR/oauth2/users - Return list of users.
>Headers: > - Content-Type: application/json > - Authorization: Bearer ACCESS_TOKEN > >
Sample response:
[
[
"id": 1,
"name": "Sample name",
"email": "sample@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
[
"id": 2,
"name": "Sample name",
"email": "another@email.com",
"password": "sample_long_password_string",
"remember_token": null,
"created_at": "2018-01-01 10:00:00",
"updated_at": "2018-01-01 10:00:00",
],
]
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.