TRESTRequest response very slow


I am using TRESTRequest along with TRestClient And TRestRequest.

I have a URL that returns JSON. I have assigned this URL to TRestClient. I made the necessary connection between the above components.

Then I do RestRequest.Execute to get the JSON from URL. I am getting the result , buts its very slow. When I run the same URL on chrome its instant.

Please advice what I might be doing wrong?

Found out that on wifi (50 mbps) its very slow. But on mobile(2 mbps) it is instant. No other app is slow on wifi.

So further found out that its slow only on secured wifi. Response is instant on open wifi. For testing most of my code is at design time. Here is design time setting.

object RESTResponse: TRESTResponse
ContentType = ‘application/json’
Left = 48
Top = 200
object RESTRequest: TRESTRequest
Client = RESTClient
Params = <>
Response = RESTResponse
OnAfterExecute = RESTRequestAfterExecute
SynchronizedEvents = False
Left = 32
Top = 136
object RESTClient: TRESTClient
Accept = ‘application/json, text/plain; q=0.9, text/html;q=0.8,’
AcceptCharset = ‘UTF-8, *;q=0.8’
BaseURL = ‘https://……………’
Params = <>
HandleRedirects = True
Left = 96
Top = 120

I am loading my JSON by calling


Comments are closed.