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 Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.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:

    
  1. Re: TCPsend with POST? (Rob Marquardt 1999)
  2. TCPsend with POST? (Matthias Precht 1999)
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 Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.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:

Bug or syntax error on my part? (1997) Banners (1997) OT: Backup Strategies (2007) [WebDNA] New 7.1.702 version (2012) Applescript, WebDNA, and PDF (1997) Sorting LISTFILES (1997) Single Link browsing (1997) tpl pages in dreamweaver (2000) Converting a Magazine to a Web Site with WebCat (1999) Individual LineItemChangePassword files would be better ... (1999) WebCat2 Append problem (B14Macacgi) (1997) trouble updating records in database (1998) [WebDNA] checking for mixed case text (2009) Questions about maximum (1999) Searching for the end (1998) Hiding Email Addresses (2003) Sorry - the list went haywire... (1998) Math (1997) Fun with Dates - revisited (1997) No. of items in shopping cart (2000)