Problem with FormPost - WeOnlyDo Discussion board

Problem with FormPost (General questions)

by Paul Draper, Tuesday, September 20, 2005, 15:37 (7003 days ago)

Hi,

I am trying to construct the following GET request using the FormPost example in the help files.


get http://devserver/tmtrack/tmtrack.dll?StdPage&Template=sframe

Note that StdPage posted attribute does not have a value.

I use the following code C++ code:

// set up url
http->URL = http://devserver/tmtrack/tmtrack.dll ;

// define search query
http->Request->FormPost->Add( StdPage , );
http->Request->FormPost->Add( Template , sframe );

http->URL = http->URL + ? + http->Request->FormPost->ToString();

This gives the following incorrect URL:


http://devserver/tmtrack/tmtrack.dll?StdPage
[color=#red]
=
[/color]
&Template=sframe


There seems to be a bug when you add a formpost with a name, but no value. The subsequent ToString() call puts an equals sign in when it shouldn't.

I have a workaround, but it requires me to process each formpost attribute myself and construct the correct URL.

Is this a bug?

Regards Paul.


Complete thread: