When I paste the link address in the browser I see that the restfull API of the free market returns the data in JSON format, but when accessing the same link using the RestDebuger that comes with Delphi (Tools / Rest Debuger) I can only receive text / html.
I also tried to put a RestClient component in Delphi xe7 and set up the urlbase but it didnt work. Does anyone know how to do it?
See what this guy did in delphiXE6, but that example did not work for me. See the link link
object RESTClient1: TRESTClient
Accept = 'application/json, text/plain; q=0.9;q=0.8,'
AcceptCharset = 'UTF-8, *;q=0.8'
AcceptEncoding = 'identity'
BaseURL = 'https://api.mercadolibre.com/sites/MLB'
ContentType = 'application/x-www-form-urlencoded'
Params = <>
HandleRedirects = True
Left = 168
Top = 8
end
object RESTRequest1: TRESTRequest
Accept = 'application/json, text/plain; q=0.9;q=0.8,'
Client = RESTClient1
Params = <
item
name = 'q'
Value = 'Smartphone'
end
item
name = 'price'
Value = '700.0-1000.0'
end>
Response = RESTResponse1
SynchronizedEvents = False
Left = 240
Top = 8
end
object RESTResponse1: TRESTResponse
ContentType = 'application/json'
RootElement = 'categories'
Left = 336
Top = 8
end