You are not logged in.
Hi, guys.
I´m developing with Delphi 7 and need to connect to a web services and make an http post with some parameters.
Can showme some example of use?
Thanks in advance
Offline
Which Web Service?
For simple REST client using some of our units, see http://stackoverflow.com/a/22078557/458259
Offline
Thanks for the example, this is what I need.
This post has a response with a json object, how can I get this response?
Sorry I'd never worked with web services.
Offline
TWinHttp.Post() returns a string.
Just pass it into a TDocVariant:
uses SynCrtSock, SynCommons;
var t,resp: variant;
begin
TDocVariant.New(t);
t.name := 'john';
t.year := 1982;
resp := _JsonFast(TWinHTTP.Post('http://servername/resourcename',t,'Content-Type: application/json'));
if resp.firstname='John' then
....
end;
Offline
Many thanks for your kuicly response, it´s all i need for now.
Offline
Hi Arnaud,
Looks like TWinHTTP includes all functionalities needed to implement a generic REST client?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
What if I post a flac audio file (or stream) for the google Speech Api? TDocVarient will handle this?
Offline