We are switching from SOAP to REST and I am asking myself which implementation/class is the best: HttpClient or RestClient? Which one should i choose and why?
I started with RestClient but run into difficulties loading a file (octet-stream) into PowerBuilder.
The following works fine as long as the request returns a string into ls_json. It works fine with text files. But when the request returns a PDF file or similar it fails.
inv_restclient.SendGetRequest(ls_url, ls_json)
I found out that HttpClient offers the possibility to return a blob which works perfectly:
BLOB lbl_filecontent
lhc_HttpClient.SendRequest("GET", ls_url)
lhc_HttpClient.GetResponseBody(lbl_filecontent)
With other words: so far HttpClient is my first choice.
Which way have you choosed? And why?
Kind regards!
Olaf
It's forte is really designed to work best with RestFul Web services like ones built with SnapDevelop. In Snap, you're probably using the .Net DataWindow. So now you probably need to transfer the .Net DW buffer over to a PB C/S DW. This is where the RestClient class shines for performing either direct DW to DW transfers.
Regards ... Chris