# Welcome to REST Client Server Demo

Here you can learn about how to make REST server/client with DooPHP.

Check out the links page for a list of URLs available in this demo. Download Firefox Poster addon for quick testing of POST/PUT/DELETE request.

Download the source.

Test drive REST request to Twitter API:

    # Check out Twitter Response Code
    # This link get the daily search trend from Twitter
    /client/twitter/daily_trends

    # This link get the followers of Doophp from Twitter
    /client/twitter/follower

    # This link posts an update to your Twitter, replace the parameters.
    /client/twitter/post/:username/:password/:message

Test drive REST APIs built with DooPHP:

    # The code for the REST API is in RestServerController
    # List all food in XML format
    /api/food/list/all.xml

    # List all food in JSON format
    /api/food/list/all.json

    # List food by id(1-9) in XML format
    /api/food/list/1.xml

    # List food by id(1-9) in JSON format
    /api/food/list/1.json

    # List food by id(1-9) in JSON format
    /api/food/list/1.json

    # Create new food and get result in JSON/XML format, (format is parsed from Accept header)
    /api/food/create     - POST request

    # Update food and get result in JSON/XML format, (format is parsed from Accept header)
    /api/food/update     - PUT request

    # Delete food and get result in JSON/XML format, (format is parsed from Accept header)
    /api/food/delete/1     - DELETE request

    # Access a method that requires HTTP authentication
    /api/admin/dostuff     - POST request

Test drive client for the REST APIs above

    # The code for the REST client request is in RestClientController
    # Request to the API /api/food/list/all.xml
    /client/food/list/all.xml

    # Request to the API /api/food/list/all.json
    /client/food/list/all.json

    # Request to the API /api/food/list/1.json
    /client/food/list/1.json

    # Request to the API /api/food/list/1.xml
    /client/food/list/1.xml

    # Request to the API /api/food/create
    /client/food/new/Lamb Steak/steak/10 out of 10

    # Request to the API /api/food/update
    /client/food/edit/2/Lamb Steak/steak/10 out of 10

    # Request to the API /api/admin/dostuff
    # authentication needed, change the username and password (admin=>1234)
    /client/food/admin/:username/:password

BACK TO TOP