BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parameters in http post request ?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Staffan
Guest





PostPosted: Fri Apr 23, 2004 4:12 pm    Post subject: Parameters in http post request ? Reply with quote



Hi all,

I'm testing a webapplication with a program sending a http post request
using IdHttp with code like:

temp := '&ClientId=0702224039' + Chr(13) + Chr(10) +
'&ClientVersion=1.0';

try
IdHTTP1 := TIdHTTP.Create(Self);
listItem := TStringList.Create;
inStream := TMemoryStream.Create;
webPostStream := TMemoryStream.Create;

temp := '&ClientId=0702224039' + Chr(13) + Chr(10) +
'&ClientVersion=1.0';

try
listItem.Text :=
StringReplace(ListBox1.Items[ListBox1.ItemIndex], ';', Chr(13) +
Chr(10),
[rfReplaceAll]);

if listItem.Strings[0] = 'AlarmReq' then
begin
URL := FRescueURL + '/' + listItem.Strings[0];

listItem.Clear;
listItem.Text := temp;
IdHTTP1.Post(URL, listItem, inStream);
...........


This is received in the webapp with:

try
Response.Content := '';

id := Request.ContentFields.Values['ClientId'];

............

This works fine, but when changing the & to ? for the first parameter as it
should be according to a colleague
it doesn't work any more.

Any suggestion on why would be appreciated

Regards
Staffan


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.