What does everyone think of the native THTTPClient (introduced in XE8 I think) versus the ICS components from Francois Piette.

What does everyone think of the native THTTPClient (introduced in XE8 I think) versus the ICS components from Francois Piette.

I've been getting a random weird 3 to 9 second stall occasionally using the ICS component when doing a simple GET to a local HTTPS/SSL server. I tried switching to the native THTTPClient and never get any stall at all, and the typical fetch is about twice as fast. It's also nice that I don't need to bundle the OpenSSL dlls with my app.

Are there any gotcha's in using the THTTPClient that I may not be aware of. I've been using ICS for years and never had any issues until today. And to be fair, my stall may not be caused by ICS at all, it could be in my code; but I did solve it by switching away from ICS.

Comments

  1. Brian Ford Which kind of parameters you have to pass? Query and header params are name=value pairs so it is hard to think having repetitions in names. Path params do not have a name so should not be a problem to have multiple ones. Or are you talking about form params? I can send multiple form params even with the same fieldname...

    ReplyDelete
  2. Somebody has an example about having feedback on sent data? There is an OnReceiveData event on TNetHttpClient but I could not find a way to track data sent... (would be useful when sending files through a multipart/form-data to give feedback to the user)...

    ReplyDelete
  3. Andrea Magni in my case it was query params in the url of a get request needed duplicate name/value pairs.. I agree it's a stupid API on the server that works like that.. I contacted the server provider and thankfully they fixed it in their API to work differently.. My alternative would have been to just use THTTPClient instead of TRestClient and do all the URL building myself..

    ReplyDelete

Post a Comment