Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-696

Add RESTFul endpoint for /cars in controller-demo

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 1.0.0.M8
    • 1.0.0.M8
    • controller , examples
    • None

    Description

      Add an additional Route for the '/cars'. There is currently one Route that supports the HTTP POST methods.
      This task should add a second route for '/cars' which supports the HTTP GET method and also demonstrates using query parameters and using a custom media type. For example

      route()
             .from("/cars")
             .on(RequestMethod.POST)
             .to(Home.class).save(formParam(Car.class));
      route()
             .from("/cars")
             .on(RequestMethod.GET)
             .produces(MediaType.JSON.toString(), "application/custom")
             .to(Home.class).get(param("color", "pink"), param("brand", "mini"));
      

      Attachments

        Issue Links

          Activity

            People

              dbeveniu Daniel Bevenius (Inactive)
              dbeveniu Daniel Bevenius (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: