[Oil] RestClientBase using UrlRequest vs HttpService
I haven't looked 'under the hood' much at the differences between using UrlRequest vs HttpService. One of the benefits of HttpService I know is in using different ResultFormats.
In my current app I'm leveraging Promises and all my http service calls return XML. In the previous version, before leveraging Promises, I was using HttpService and setting the result type to e4x.
Are there any major disadvantages to just using RestClientBase, which uses URLRequest, and then just converting the String loaded in my Promise result to XML? Things are working just fine this way, I'm just curious if I'm missing anything not using HttpService?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Shaun Smith on 23 Jan, 2011 12:03 AM
Hi Rickcr,
I'm not too happy with RestClientBase - it was a quick-n-dirty design and needs to be re-visited. If you like the Promise approach, but also wish to use HTTPService (to integrate nicely with Flex.. ChannelSets etc), I'd suggest you write an IRestClient implementation that uses HTTPService internally. That should give you the best of both worlds.
3 Posted by rickcr on 23 Jan, 2011 05:47 AM
Actually the regular UrlRequest (of RestClientBase) seems to be working perfectly...just wondering what I'm 'missing' not using HttpService.
When you get time, no rush, I'd be curious at what you'd want to "revisit" to improve the implementation? (it seems pretty good to me:)
4 Posted by reddys.raghuu on 12 Aug, 2011 03:18 PM
Yeah, i am also interested to know the best one in case if you have to deal with only XML.
Even in my case also i get the result in XML format only & i want to know the best one in considering the performance.
Ondina D.F. closed this discussion on 12 Dec, 2011 12:24 PM.