[jbosstools-issues] [JBoss JIRA] (TOOLSDOC-560) We should add an illustration of the RESTFUL output
Marián Labuda (JIRA)
issues at jboss.org
Tue Mar 3 02:39:12 EST 2015
[ https://issues.jboss.org/browse/TOOLSDOC-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045478#comment-13045478 ]
Marián Labuda commented on TOOLSDOC-560:
----------------------------------------
Thanks for letting me know. But I am afraid this won't work at all as it is described in tutorial.
The issue is with HTTP request - once you open http://localhost:8080/ticket-monster/rest/events in a browser, you sent and HTTP request with method GET and content type text/html (this is used by default in browsers). And because our method annotated with GET annotation is returning application/json, it will fail on 404 error. To show your RESTful web service successfully in a browser you have to modify content type of method to produce text/html.
> We should add an illustration of the RESTFUL output
> ---------------------------------------------------
>
> Key: TOOLSDOC-560
> URL: https://issues.jboss.org/browse/TOOLSDOC-560
> Project: Documentation for JBoss Tools and Developer Studio
> Issue Type: Enhancement
> Affects Versions: 4.2.0.Final
> Environment: Build Name: 22960, Start Developing-8.0
> Build Date: 22-10-2014 11:29:36
> Topic ID: 13785-717269 [Latest]
> Reporter: Len DiMaggio
> Assignee: Michelle Murray
> Priority: Minor
> Fix For: 4.2.3.Beta1
>
>
> Title: Add a RESTful Web Service
> Describe the issue:
> The final step in this section reads:
> Open a new Web Browser and in the address bar of the Web Browser enter http://localhost:8080/ticket-monster/rest/events. This shows the output of the new RESTful endpoint.
> Suggestions for improvement:
> We should add test explaining to the reader that the output should look like this:
> [{"id":2,"version":1,"name":"Rock concert of the decade","description":"Get ready to rock...","major":true,"picture":null},{"id":1,"version":1,"name":"Shane's Sock Puppets","description":"This critically acclaimed masterpiece...","major":true,"picture":null}]
> Additional information:
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jbosstools-issues
mailing list