Re: TCPsend with POST?
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25004
interpreted = N
texte = On 12/2/99 9:57 am, Matthias Precht so noted...>Did anyone of you get TCPsend to work with POST-Requests?>I tried to figure out a correct HTTP-header with OTSessionWatcher, but >this code does not work:>>[TCPconnect host=www.foo.net&port=80]>[TCPsend]POST /foo.asp HTTP/1.0[unurl]%0D%0A[/unurl]Referer: >http://www.foo.net/foo.asp[unurl]%0D%0A[/unurl]User-Agent: Mozilla/4.5 >[de] (Macintosh; I; PPC)[unurl]%0D%0A[/unurl]Host: >www.foo.net[unurl]%0D%0A[/unurl]Content-type: >application/x-www-form-urlencoded[unurl]%0D%0A[/unurl]Content-lenght: >200[unurl]%0D%0A[/unurl][unurl]%0D[/unurl][unurl]%0A[/unurl][formvariables >name=t_&exact=F][getchars >start=3][name][/getchars]=[url][value][/url]&[/formvariables]x=47&y=15[unu>rl]%0D%0A[/unurl][/tcpsend]>[/TCPconnect]>>The remote server seems not to get the query strings.Could you try removing the [TCPconnect] and [TCPsend] tags to have it display on screen and see if the page is creating the proper structure?There's a typo in the Content-length: header. And unless you're always going to be sending exactly 200 characters, you'll need to do a [countChars] on the data you're sending (including variable names, = and & characters).Otherwise, it looks very similar to what I've used in the past to send POST submissions to Filemaker.FYI, the line [unurl]%0D%0A[/unurl][unurl]%0D[/unurl][unurl]%0A[/unurl] could simply be [unurl]%0D%0A%0D%0A[/unurl] -- or set the mess to a text variable at the top for reuse in your code, ie. [text]CRLF=[unurl]%0D%0A[/unurl][/text].Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
On 12/2/99 9:57 am, Matthias Precht so noted...>Did anyone of you get TCPsend to work with POST-Requests?>I tried to figure out a correct HTTP-header with OTSessionWatcher, but >this code does not work:>>[TCPconnect host=www.foo.net&port=80]>[tcpsend]POST /foo.asp HTTP/1.0[unurl]%0D%0A[/unurl]Referer: >http://www.foo.net/foo.asp[unurl]%0D%0A[/unurl]User-Agent: Mozilla/4.5 >[de] (Macintosh; I; PPC)[unurl]%0D%0A[/unurl]Host: >www.foo.net[unurl]%0D%0A[/unurl]Content-type: >application/x-www-form-urlencoded[unurl]%0D%0A[/unurl]Content-lenght: >200[unurl]%0D%0A[/unurl][unurl]%0D[/unurl][unurl]%0A[/unurl][formvariables >name=t_&exact=F][getchars >start=3][name][/getchars]=[url][value][/url]&[/formvariables]x=47&y=15[unu>rl]%0D%0A[/unurl][/tcpsend]>[/TCPconnect]>>The remote server seems not to get the query strings.Could you try removing the [tcpconnect] and [tcpsend] tags to have it display on screen and see if the page is creating the proper structure?There's a typo in the Content-length: header. And unless you're always going to be sending exactly 200 characters, you'll need to do a [countchars] on the data you're sending (including variable names, = and & characters).Otherwise, it looks very similar to what I've used in the past to send POST submissions to Filemaker.FYI, the line [unurl]%0D%0A[/unurl][unurl]%0D[/unurl][unurl]%0A[/unurl] could simply be [unurl]%0D%0A%0D%0A[/unurl] -- or set the mess to a text variable at the top for reuse in your code, ie. [text]CRLF=[unurl]%0D%0A[/unurl][/text].Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Rob Marquardt
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Can I do these? (1997)
Price lookup problem - was Cart questions (1997)
[WebDNA] XML error? (2015)
two unique banners on one page (1997)
Word search (1997)
Form based Redirect (2001)
Sorting error (1997)
Is this possible in simple search? question? (1998)
Taxable Shipping (2003)
ACGI processing for .html (1997)
covertchars db to keep CR's, but not new ones (2002)
Running _every_ page through WebCat ? (1997)
Template Encrypt Speed (1998)
Which GUI HTML editors work with WC ? (1997)
unable to launch acgi in WebCat (1997)
Paths (2000)
Smith Micro - no competition (2000)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
Formatting of email on NT (1998)
Setting up the server (1997)