Danijel, please throw me a bone here.
I am trying to POST to a 3rd party web service, and specifically POST additional parameters as follow (but the web service always replies that I am missing the specified parameters):
<DELPHI>
RtcDataRequest1.Request.ContentType:='application/x-www-form-urlencoded'; // important!!!
RtcDataRequest1.Request.Method := 'POST';
RtcDataRequest1.Request.Host := '
www.website.com';
RtcDataRequest1.Request.FileName := '/AService';
RtcDataRequest1.Request.Params.Clear;
RtcDataRequest1.Request.Params.AsString[ 'From' ] := URL_Encode( 'AFRomParameter' );
RtcDataRequest1.Request.Params.AsString[ 'To' ] := URL_Encode( 'AToParameter' );
RtcDataRequest1.Request.Params.AsString[ 'Body' ] := URL_Encode( ABody );
// I also tried using the URI, but got the same thing
//RtcDataRequest1.Request.URI := URI;
// I also tried using the Request.Query, but got the same thing
// RtcDataRequest1.Request.Query[ 'From' ] := URL_Encode( 'AFromParam' );
// RtcDataRequest1.Request.Query[ 'To' ] := URL_Encode( 'AToParam' );
// RtcDataRequest1.Request.Query[ 'Body' ] := URL_Encode( ABody );
//
try
RtcHttpClient1.Connect;
RtcDataRequest1.Post();
except
on E: Exception do
begin
Raise;
end;
end;
<DELPHI>
As you can see I am posting the needed parameters, aren't I doing this right? What am I missing?
Please don't tell me to have a look at the demos, I have done that already and am stuck.
As always, please and thank you are in order.
Richard