NetTalk Central

Author Topic: Trying to learn how to post data to a web form...  (Read 11875 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Trying to learn how to post data to a web form...
« on: January 22, 2010, 09:55:59 AM »
I'm trying to post a license number to a web form.  I'm using Fiddler and I got this error:

Fiddler has detected a protocol violation in session #41.
Content-Length mismatch: Request Header claimed 10 bytes, but sent 14

Now I got this error to go away by doing this:

ThisWebClient.ContentLength = Len(Clip(PostString))+4

This can't be the correct way to handle this, right?

Anyway, could someone get me pointed in the right direction?  I REALLY new at this aspect of NetTalk.  This is the webpage I'm trying to POST data to:

http://hblb.state.al.us/Lic_Search/search.asp

Thank you!!!!!!

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Trying to learn how to post data to a web form...
« Reply #1 on: January 22, 2010, 10:14:30 AM »
Alright Bruce, Sean...?

I think I need to use the Multi-Part form coding..?  Am I on the right track?

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Trying to learn how to post data to a web form...
« Reply #2 on: January 22, 2010, 10:56:34 PM »
Hi Don,

The whole Content-Length thing has been sorted in the current NetTalk 4 build.(But actually yes, +4 in the older builds was the correct thing to do).

I don't think you need to go to multi-part.

What are you setting your "Data" string to that you are posting?

cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Trying to learn how to post data to a web form...
« Reply #3 on: January 23, 2010, 09:47:23 AM »
Hey Bruce,

I've got NetTalk 5.  Now this particular app had NT 4 back when but now I have NT5.  Is there something I need to do with this app to "strip away" the old NT4 stuff?

Second, I've got the posting sorted out.  Now I'm trying figure out what to do with the returned data.  I would like to display the returned HTML as a web page in a OLE/OCX control.  I don't know if that's possible.

Thanks for your reply!
Don

P.S.  I just downloaded the latest NT5 build and I get the Fiddler error even with the NT Demo app....
« Last Edit: January 23, 2010, 12:50:11 PM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11