 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Staffan Guest
|
Posted: Fri Apr 23, 2004 4:12 pm Post subject: Parameters in http post request ? |
|
|
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 |
|
 |
|
|
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
|
|