tag:blogger.com,1999:blog-6432484966567158349.post7769993720569953596..comments2023-10-23T17:45:24.408-07:00Comments on Learn REST: A Tutorial: 5. REST Server ResponsesDr. M. Elksteinhttp://www.blogger.com/profile/01086047572579338522noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-6432484966567158349.post-17401925234148127982014-11-24T22:23:30.340-08:002014-11-24T22:23:30.340-08:00Thanks ELKSTEIN,
Good explanation And comments rep...Thanks ELKSTEIN,<br />Good explanation And comments replay.<br />Anonymoushttps://www.blogger.com/profile/11854295274093890101noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-68915642326901666972013-10-01T04:33:18.137-07:002013-10-01T04:33:18.137-07:00Please clarify "One option is not acceptable ...Please clarify "One option is not acceptable as a REST response format... " as we know HTML is used more frequently for response.Satyendra Kumarhttps://www.blogger.com/profile/18342768448338456855noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-82428236089121767712013-07-13T00:07:09.093-07:002013-07-13T00:07:09.093-07:00Hi Piloto,
XML, CSV, and JSON all have their disa...Hi Piloto,<br /><br />XML, CSV, and JSON all have their disadvantages, obviously. The most clear disadvantage is shared by all three, though: they are text formats. This is very beneficial in most scenarios: ever so much easier to read, understand, and debug these formats, compared to binary formats. However, when very large amounts of traffic are involved, using binary formats can both save Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-58776912253990628932013-07-12T03:18:03.803-07:002013-07-12T03:18:03.803-07:00Hi Dr.Elkstein, great Tutorial, first of all.
Can...Hi Dr.Elkstein, great Tutorial, first of all.<br /><br />Can you point out the disadvantages of using XML,CSV and JSON. I believe you only mention advantages. Pilotohttps://www.blogger.com/profile/10737354534735192957noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-50795757476384781642013-04-07T20:47:11.811-07:002013-04-07T20:47:11.811-07:00Great Tutorial even in 2013
Great Tutorial even in 2013 <br />Anonymoushttps://www.blogger.com/profile/09670648235956815293noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-78066642150248957742012-05-20T21:40:57.931-07:002012-05-20T21:40:57.931-07:00Hi Antanas,
First, I explicitly limited my prefer...Hi Antanas,<br /><br />First, I explicitly limited my preference for standard headers to read-only requests; so your comment about put/delete requests is unrelated.<br /><br />And, in some contexts, yes, the ability to test things from a browser is important. When a client calls to complain that things don't work as expected, it's very handy to be able to ask him to open that page from a Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-77674483765768275212012-04-12T10:28:34.256-07:002012-04-12T10:28:34.256-07:00I do not understand:
One option is not acceptable ...I do not understand:<br />One option is not acceptable as a REST response format, ...., we find that HTML is in fact the most common REST response format...<br />the last paragraph.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-40001393217527505192012-01-12T06:34:19.928-08:002012-01-12T06:34:19.928-08:00Hello Mader,
To find out about typing in XML, rea...Hello Mader,<br /><br />To find out about typing in XML, read about schema specification mechanisms, such as XSD, RelaxNG, etc.Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-37759257276668246792012-01-06T09:16:02.853-08:002012-01-06T09:16:02.853-08:00You mention that using XML affords type safety, ho...You mention that using XML affords type safety, how is this achieved? XML does not know anything of type, the attributes are string values as well as the node values.<br /><br />How do you know this is a number?<br /><br />14Maderhttps://www.blogger.com/profile/09129097293582245105noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-55713969982930401712011-09-23T12:57:52.938-07:002011-09-23T12:57:52.938-07:00Thanks, Dave -- corrected.Thanks, Dave -- corrected.Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-7238900706613568462011-09-21T13:02:15.962-07:002011-09-21T13:02:15.962-07:00Note spelling error in first sentence.Note spelling error in first sentence.Davehttps://www.blogger.com/profile/16536537315355189280noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-12372203029415806382011-02-10T12:32:30.471-08:002011-02-10T12:32:30.471-08:00Hello zazi,
Unlike SOAP-based web services, REST ...Hello zazi,<br /><br />Unlike SOAP-based web services, REST is, by definition, not very rigid. This means that, when you write a REST service, you can <i>choose</i> to include references to said namespaces and definitions, but nothing says you <i>have</i> to. Of course, a service that does offer such references can be more useful, or easier to use. But it's certainly not a strict requirement.Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-91490768178127534802011-01-27T01:10:51.339-08:002011-01-27T01:10:51.339-08:00I thought that one constraint from the uniform int...I thought that one constraint from the uniform interface feature of REST is that the messages have to be self-describing. As I understand it, that means, one has to include at least (a) reference(s) to the namespace(s) that explain(s) the utilized terms (cf. http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven).zazihttps://www.blogger.com/profile/13948911160717019354noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-56607769195877781012011-01-07T14:36:28.768-08:002011-01-07T14:36:28.768-08:00Actually one thing that comes to my mind is the us...Actually one thing that comes to my mind is the use of MIME types as part of URL, just the same way as in Accept header. You can make it optional and use that whole thing out of anywhere you want including web browser.0x1ehttps://www.blogger.com/profile/13780658737498694489noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-40618013344548426492010-07-26T09:52:13.902-07:002010-07-26T09:52:13.902-07:00Hi Dario,
Indeed, it is possible to specify the d...Hi Dario,<br /><br />Indeed, it is possible to specify the desired output type in the HTTP "Accept" request header. However, personally, I prefer (for read-access-only REST requests) to be able to issue the request directly from the browser. I find that this makes debugging significantly easier. And since, in the browser, you can't easily change the HTTP headers, using a URL Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-48468086727835716252010-07-26T09:21:51.739-07:002010-07-26T09:21:51.739-07:00Hi Dr. Elkstein, GREAT tutorial!
On the question ...Hi Dr. Elkstein, GREAT tutorial!<br /><br />On the question by mjuchems, isn't it possible to use the same URL for different formats, and let the client negotiate the content type by request headers or something like that?Dariohttps://www.blogger.com/profile/16395135558606800706noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-4304154603601334842010-06-24T07:25:50.974-07:002010-06-24T07:25:50.974-07:00Hi mjuchems,
The best alternative is probably to ...Hi mjuchems,<br /><br />The best alternative is probably to use a different URL for each -- e.g., a different path on the server. For example, http://www.example.com/products/12345 vs. http://www.example.com/products/csv/12345 (where the shorter format is used for the "default", or preferred, output format -- note the "csv" in the second URL).<br /><br />Proper server Dr. M. Elksteinhttps://www.blogger.com/profile/01086047572579338522noreply@blogger.comtag:blogger.com,1999:blog-6432484966567158349.post-29096705473092789932010-06-24T06:06:27.888-07:002010-06-24T06:06:27.888-07:00So how do you request different types of responses...So how do you request different types of responses? For example, the same REST service can serve up both XML and CSV. Where do you stick the requested type in the request?mjuchemshttps://www.blogger.com/profile/02529038864456023235noreply@blogger.com