🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #247

Re: NMHTTP and POST

#247
From: Eduardo Jauch
Date: Tue, 06 Feb 2007 15:57
51 lines
2591 bytes
Hans Galema escreveu:
>> function enviar()
>> {
>>   var frm = document.forms[0];
>>   frm.action = "/agendamento-web/login";
>>   frm.task.value = 'login';
>>   frm.method = "POST";
> 
> Hmmm. Did not know that it was possible to change a 'method' from
> get to post.
> 

I'm too... I need more search on the subject for shure... Do you know 
any good newsgroup or forum about Java script?

>> <form name="loginForm" method="get" action="/agendamento-web/login">
> 
> 
>> AnsiString post_data = "task=login&item=loginForm&tipo=AGENCIA+DE+VIAGEM
>  > &redirect=/agenciadores.do&login=MyLogin&senha=MyPassword
>  > &locale=pt_BR&com.telecom.tipo_usuario=INTERNET";
> 
>> NMHTTP1->Post("/agendamento-web/login", post_data); //FAIL. Call OnFail
>> //ERROR. Causes a error.
> 
> Please tell exactly which error!
> 

   Is an exception, like if the url are incorrect (And I think that is 
exactly this case...

>> Is the post data correct "writen" in the string?
>> Am I forgeting to do something?
> 
> I do not understand the part "&item=loginForm". As far as I can see
> item has no value. I would think it should be empty: "&item=". Or
> did't you tell the whole story?
> 

   You are correct... I try your way, but no success...

> &tipo=AGENCIA+DE+VIAGEM
> 
> What made you decide to replace ' ' by '+' ?
> 

   Was not the case? No need to do this?
   I saw some sites that used this way to post a form those words have 
spaces ...

Thanks! :)
Technical Details
Message-ID: <45c8a1dd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!feeder.news-service.com!hitnews.eu!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <45c7dcdf@newsgroups.borland.com> <45c85e29$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,192a554a5062421b
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 06 Feb 2007 13:57:21 -0200
From: Eduardo Jauch <eduardo.jauch@gmail.com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Re: NMHTTP and POST
References: <45c7dcdf@newsgroups.borland.com> <45c85e29$1@newsgroups.borland.com>
In-Reply-To: <45c85e29$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 200.193.163.60
Message-ID: <45c8a1dd$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170776541 200.193.163.60 (6 Feb 2007 07:42:21 -0800)
Lines: 51
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!feeder.news-service.com!hitnews.eu!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail