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:
Sorting error (1997)
WEBCAT with SQL backend. Help please! (2000)
Still search problems! (1999)
DB Field Name? (2000)
WC Database Format (1997)
Working Days (2004)
Multiple Pulldowns (1997)
Feature Request: ! character bug correct in [showif (2000)
Further on formula.db failure to calculate shipCost (1997)
[OT] Command Line Change Name (2004)
sorting question... (2001)
Internet Explorer and caching (2000)
Time Tracking (2003)
autocommit problem (1998)
Gathering the values of matching fields in a database. (1998)
GuestBook example (1997)
no global [username] or [password] displayed ... (1997)
[WebDNA] WebDNA for Windows Newbie Questions (2008)
Sku numbers (1997)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)