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