viniciussanchez/RESTRequest4Delphi

Usage In Separate Thread

Closed this issue · 1 comments

Is RR4D thread safe? Can you direct me with an example of using RR4D within separate Thread/Task?

Hi, here we use in multithread and this works fine.

On use
TRequest.New.BaseURL('http://localhost:8888/users')
.AddHeader('HeaderName', 'HeaderValue')
.AddParam('ParameterName', 'ParameterValue')
.Accept('application/json')
.Get;

All objects are unique instance created (And auto destroyed after scope end).

Obs.: Always test before use in production.