Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Any incoming GET request that has the URL of "/welcome" would be handled by WelcomeMessage class's returnWelcomeMessage() method. A string is returned which represents the response body. To return more complex response entities, see the Request/Response entities page.

Anchor
HTTPMethods
HTTPMethods

HTTP Methods (@GET, @POST, @PUT, @DELETE)

...

Notice that the updateWelcomeMessage has an unannotated parameter which represents an incoming request's body. See the Request/Response entities page for more details on how request/response entities are handled.

Anchor
SubresourceMethod
SubresourceMethod

Subresource Methods (@Path and @GET, @POST, @PUT, @DELETE on Java method)

...

A HTTP URL request to "/administrator" would resolve to Administrator#findUserInfo(). A HTTP URL request to "/administrator/name" would invoke the Administrator#getJustUserName() method. Finally a HTTP URL request to "/administrator/id" would resolve to Administrator#getUserId().

Anchor
SubresourceLocator
SubresourceLocator

Subresource Locators (@Path on Java method)

...