Re: [WebDNA] how can i grab the contents of a post?

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106723
interpreted = N
texte = --Apple-Mail-5-1067829716 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii If a file is being sent via HTTP post you could try this [formvariables] [Showif [Url][name][/Url]^[Url]filename=3D"[/Url]] [WriteFile Secure=3DF&File=3D[Url][fileName][/Url]][value][/WriteFile] [/ShowIf] [/formvariables] On 13/06/2011, at 2:31 PM, Olin Lagon wrote: > That would be nice but I have no idea what to put inside the = [writefile] commands to grab the contents of the post. I tried a bunch = of names hoping for some undocumented way to accomplish this. >=20 > Stuart Tremain wrote: >>=20 >> Can you writefile the incoming post ? >>=20 >> On 13/06/2011, at 2:05 PM, Olin Lagon wrote: >>=20 >>> Thanks Stuart. It's actually reversed. >>>=20 >>> A device is sending an XML doc via post to our server. I can log = that post but I can't grab the contents of the post which is an XML = document. As you can see in the thread, I can read the headers. The post = is sending to our server. In PHP, I can grab the contents of the post = with file_get_contents('php://input'). But in WebDNA there doesn't seem = to be anyway to grab the contents of a post if it is not send as a = series of form variables. >>>=20 >>> I checked the docs and don't see anything :( >>>=20 >>> Am starting to write this interface in PHP and call it a day. >>>=20 >>> Thanks, Olin >>>=20 >>> Stuart Tremain wrote: >>>>=20 >>>> I think this is what you mean: >>>>=20 >>>>=20 >>>>=20 >>>> [text muti=3DF]XML_result=3D[tcpconnect = host=3Dwww.host.com&port=3D443&ssl=3DT][!] >>>> [/!][tcpsend skipheader=3DT] >>>>=20 >>>> ALL YOUR TCP CONNECT STUFF HERE >>>>=20 >>>> [/TCPSend][!] >>>> [/!][/tcpconnect][/text] >>>>=20 >>>>=20 >>>> Then just parse the resulting variable [XML_result] to get what you = need. >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> On 13/06/2011, at 1:08 PM, Olin Lagon wrote: >>>>=20 >>>>> Yes I can parse the XML but I can't get the contents of the post! = What I need is the WebDNA equivalent of >>>>>=20 >>>>> $postText =3D file_get_contents('php://input');=20 >>>>>=20 >>>>> I may have to just write this in php :( >>>>>=20 >>>>> What the above code does is takes the file contents, something I = can't seem to do via webdna. >>>>>=20 >>>>> Unless someone has an idea on how to grab the raw POST of an = incoming post that is not set to a form variable. >>>>>=20 >>>>> Thanks! Olin >>>>>=20 >>>>> Stuart Tremain wrote: >>>>>>=20 >>>>>> Olin >>>>>>=20 >>>>>> If you are receiving XML back, you will need to parse the XML >>>>>>=20 >>>>>> http://www.webdna.us/page.dna?numero=3D284 >>>>>>=20 >>>>>>=20 >>>>>> On 13/06/2011, at 12:43 PM, Olin Lagon wrote: >>>>>>=20 >>>>>>> Aloha all, am trying to work with an API that posts an XML doc. = I can get it to post but it is not setting the XML to a formvariable. = Anyone know how I can grab the contents of the post? >>>>>>>=20 >>>>>>> Here is the test code to show what is hitting our server >>>>>>>=20 >>>>>>> [writefile log.txt] >>>>>>>=20 >>>>>>> http header >>>>>>> --------------- >>>>>>> [ListMIMEHeaders] >>>>>>> [name] =3D [value] >>>>>>> [/ListMIMEHeaders] >>>>>>>=20 >>>>>>> form vars >>>>>>> --------------- >>>>>>> [formvariables] >>>>>>> [name] =3D [value] >>>>>>> [/formvariables] >>>>>>> [/writefile] >>>>>>>=20 >>>>>>> And here is the response. As you can see the form vars are empty = :( >>>>>>>=20 >>>>>>> Thanks! Olin >>>>>>>=20 >>>>>>> http header >>>>>>> --------------- >>>>>>> HOST =3D www.kanuhawaii.org >>>>>>> Connection =3D Close >>>>>>> Content-Type =3D application/xml >>>>>>> msg-timestamp =3D 1307900329 >>>>>>> Content-Length =3D 81 >>>>>>>=20 >>>>>>>=20 >>>>>>> form vars >>>>>>> --------------- >>>>>>>=20 >>>>>>>=20 >>>>>>> --------------------------------------------------------- >>>>>>> This message is sent to you because you are subscribed to >>>>>>> the mailing list . >>>>>>> To unsubscribe, E-mail to: >>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>>>> Bug Reporting: support@webdna.us >>>>>>=20 >>>>>> --------------------------------------------------------- >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list . >>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>>> Bug Reporting: support@webdna.us >>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>>>=20 >>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail-5-1067829716 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii If a = file is being sent via HTTP post you could try = this

[formvariables]
[Showif = [Url][name][/Url]^[Url]filename=3D"[/Url]]
[WriteFile = Secure=3DF&File=3D[Url][fileName][/Url]][value][/WriteFile]
[/ShowIf]
[/formvariables]




On 13/06/2011, = at 2:31 PM, Olin Lagon wrote:

That would be nice but I have no idea what to put inside the [writefile] commands to grab the contents of the post. I tried a bunch of names hoping for some undocumented way to accomplish = this.

Stuart Tremain wrote:
Can you writefile the incoming post ?

On 13/06/2011, at 2:05 PM, Olin Lagon wrote:

Thanks Stuart. = It's actually reversed.

A device is sending an XML doc via post to our server. I can log that post but I can't grab the contents of the post which is an XML document. As you can see in the thread, I can read the headers. The post is sending to our server. In PHP, I can grab the contents of the post with file_get_contents('php://input'). But in WebDNA there doesn't seem to be anyway to grab the contents of a post if it is not send as a series of form variables.

I checked the docs and don't see anything :(

Am starting to write this interface in PHP and call it a day.

Thanks, Olin

Stuart Tremain wrote:
I think this is what you mean:



[text muti=3DF]XML_result=3D[tcpconnect host=3Dwww.host.com&port=3D443&ssl=3DT][!]
[/!][tcpsend skipheader=3DT]

ALL = YOUR TCP CONNECT STUFF HERE

[/TCPSend][!]
[/!][/tcpconnect][/text]


Then = just parse the resulting variable [XML_result] to get what you need.





On 13/06/2011, at 1:08 PM, Olin Lagon = wrote:

Yes I = can parse the XML but I can't get the contents of the post! What I need is the WebDNA equivalent of

        = $postText =3D file_get_contents('php://input');

I may have to just write this in php :(

What the above code does is takes the file contents, something I can't seem to do via webdna.

Unless someone has an idea on how to grab the raw POST of an incoming post that is not set to a form variable.

Thanks! Olin

Stuart Tremain wrote:
OlinIf you are receiving XML back, you will need to parse the XMLhttp://www.webdna.us/p=age.dna?numero=3D284On 13/06/2011, at 12:43 PM, Olin Lagon wrote:
Aloha all, am trying to work =with an API that posts an XML doc. I can get it to post but it is not =setting the XML to a formvariable. Anyone know how I can grab the =contents of the post?Here is the test code to show what is hitting our server[writefile log.txt]http header---------------[ListMIMEHeaders][name] =3D [value][/ListMIMEHeaders]form vars---------------[formvariables][name] =3D [value][/formvariables][/writefile]And here is the response. As you can see the form vars are empty :(Thanks! Olinhttp header---------------HOST =3D www.kanuhawaii.orgConnection =3D CloseContent-Type =3D application/xmlmsg-timestamp =3D 1307900329Content-Length =3D 81form vars------------------------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/l=ist/talk@webdna.usBug Reporting: support@webdna.us
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/l=ist/talk@webdna.usBug Reporting: support@webdna.us
= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: = archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail-5-1067829716-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] how can i grab the contents of a post? ("Brian B. Burton" 2011)
  2. Re: [WebDNA] how can i grab the contents of a post? (Aaron Michael Kaczmarek 2011)
  3. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  4. Re: [WebDNA] how can i grab the contents of a post? (Aaron Michael Kaczmarek 2011)
  5. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  6. Re: [WebDNA] how can i grab the contents of a post? ("Psi Prime Inc, Matthew A Perosi " 2011)
  7. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  8. Re: [WebDNA] how can i grab the contents of a post? ("Psi Prime Inc, Matthew A Perosi " 2011)
  9. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  10. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  11. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  12. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  13. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  14. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  15. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  16. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  17. [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
--Apple-Mail-5-1067829716 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii If a file is being sent via HTTP post you could try this [formvariables] [Showif [url][name][/Url]^[url]filename=3D"[/Url]] [WriteFile Secure=3DF&File=3D[url][fileName][/Url]][value][/WriteFile] [/ShowIf] [/formvariables] On 13/06/2011, at 2:31 PM, Olin Lagon wrote: > That would be nice but I have no idea what to put inside the = [writefile] commands to grab the contents of the post. I tried a bunch = of names hoping for some undocumented way to accomplish this. >=20 > Stuart Tremain wrote: >>=20 >> Can you writefile the incoming post ? >>=20 >> On 13/06/2011, at 2:05 PM, Olin Lagon wrote: >>=20 >>> Thanks Stuart. It's actually reversed. >>>=20 >>> A device is sending an XML doc via post to our server. I can log = that post but I can't grab the contents of the post which is an XML = document. As you can see in the thread, I can read the headers. The post = is sending to our server. In PHP, I can grab the contents of the post = with file_get_contents('php://input'). But in WebDNA there doesn't seem = to be anyway to grab the contents of a post if it is not send as a = series of form variables. >>>=20 >>> I checked the docs and don't see anything :( >>>=20 >>> Am starting to write this interface in PHP and call it a day. >>>=20 >>> Thanks, Olin >>>=20 >>> Stuart Tremain wrote: >>>>=20 >>>> I think this is what you mean: >>>>=20 >>>>=20 >>>>=20 >>>> [text muti=3DF]XML_result=3D[tcpconnect = host=3Dwww.host.com&port=3D443&ssl=3DT][!] >>>> [/!][tcpsend skipheader=3DT] >>>>=20 >>>> ALL YOUR TCP CONNECT STUFF HERE >>>>=20 >>>> [/TCPSend][!] >>>> [/!][/tcpconnect][/text] >>>>=20 >>>>=20 >>>> Then just parse the resulting variable [XML_result] to get what you = need. >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> On 13/06/2011, at 1:08 PM, Olin Lagon wrote: >>>>=20 >>>>> Yes I can parse the XML but I can't get the contents of the post! = What I need is the WebDNA equivalent of >>>>>=20 >>>>> $postText =3D file_get_contents('php://input');=20 >>>>>=20 >>>>> I may have to just write this in php :( >>>>>=20 >>>>> What the above code does is takes the file contents, something I = can't seem to do via webdna. >>>>>=20 >>>>> Unless someone has an idea on how to grab the raw POST of an = incoming post that is not set to a form variable. >>>>>=20 >>>>> Thanks! Olin >>>>>=20 >>>>> Stuart Tremain wrote: >>>>>>=20 >>>>>> Olin >>>>>>=20 >>>>>> If you are receiving XML back, you will need to parse the XML >>>>>>=20 >>>>>> http://www.webdna.us/page.dna?numero=3D284 >>>>>>=20 >>>>>>=20 >>>>>> On 13/06/2011, at 12:43 PM, Olin Lagon wrote: >>>>>>=20 >>>>>>> Aloha all, am trying to work with an API that posts an XML doc. = I can get it to post but it is not setting the XML to a formvariable. = Anyone know how I can grab the contents of the post? >>>>>>>=20 >>>>>>> Here is the test code to show what is hitting our server >>>>>>>=20 >>>>>>> [writefile log.txt] >>>>>>>=20 >>>>>>> http header >>>>>>> --------------- >>>>>>> [listmimeheaders] >>>>>>> [name] =3D [value] >>>>>>> [/ListMIMEHeaders] >>>>>>>=20 >>>>>>> form vars >>>>>>> --------------- >>>>>>> [formvariables] >>>>>>> [name] =3D [value] >>>>>>> [/formvariables] >>>>>>> [/writefile] >>>>>>>=20 >>>>>>> And here is the response. As you can see the form vars are empty = :( >>>>>>>=20 >>>>>>> Thanks! Olin >>>>>>>=20 >>>>>>> http header >>>>>>> --------------- >>>>>>> HOST =3D www.kanuhawaii.org >>>>>>> Connection =3D Close >>>>>>> Content-Type =3D application/xml >>>>>>> msg-timestamp =3D 1307900329 >>>>>>> Content-Length =3D 81 >>>>>>>=20 >>>>>>>=20 >>>>>>> form vars >>>>>>> --------------- >>>>>>>=20 >>>>>>>=20 >>>>>>> --------------------------------------------------------- >>>>>>> This message is sent to you because you are subscribed to >>>>>>> the mailing list . >>>>>>> To unsubscribe, E-mail to: >>>>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>>>> Bug Reporting: support@webdna.us >>>>>>=20 >>>>>> --------------------------------------------------------- >>>>>> This message is sent to you because you are subscribed to >>>>>> the mailing list . >>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>>>> Bug Reporting: support@webdna.us >>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>>>=20 >>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail-5-1067829716 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii If a = file is being sent via HTTP post you could try = this

[Showif = [url][name][/Url]^[url]filename=3D"[/Url]]
[WriteFile = Secure=3DF&File=3D[url][fileName][/Url]][value][/WriteFile]
[/ShowIf]
[/formvariables]




On 13/06/2011, = at 2:31 PM, Olin Lagon wrote:

That would be nice but I have no idea what to put inside the [writefile] commands to grab the contents of the post. I tried a bunch of names hoping for some undocumented way to accomplish = this.

Stuart Tremain wrote:
Can you writefile the incoming post ?

On 13/06/2011, at 2:05 PM, Olin Lagon wrote:

Thanks Stuart. = It's actually reversed.

A device is sending an XML doc via post to our server. I can log that post but I can't grab the contents of the post which is an XML document. As you can see in the thread, I can read the headers. The post is sending to our server. In PHP, I can grab the contents of the post with file_get_contents('php://input'). But in WebDNA there doesn't seem to be anyway to grab the contents of a post if it is not send as a series of form variables.

I checked the docs and don't see anything :(

Am starting to write this interface in PHP and call it a day.

Thanks, Olin

Stuart Tremain wrote:
I think this is what you mean:



[text muti=3DF]XML_result=3D[tcpconnect host=3Dwww.host.com&port=3D443&ssl=3DT][!]
[/!][tcpsend skipheader=3DT]

ALL = YOUR TCP CONNECT STUFF HERE

[/TCPSend][!]
[/!][/tcpconnect][/text]


Then = just parse the resulting variable [XML_result] to get what you need.





On 13/06/2011, at 1:08 PM, Olin Lagon = wrote:

Yes I = can parse the XML but I can't get the contents of the post! What I need is the WebDNA equivalent of

        = $postText =3D file_get_contents('php://input');

I may have to just write this in php :(

What the above code does is takes the file contents, something I can't seem to do via webdna.

Unless someone has an idea on how to grab the raw POST of an incoming post that is not set to a form variable.

Thanks! Olin

Stuart Tremain wrote:
OlinIf you are receiving XML back, you will need to parse the XMLhttp://www.webdna.us/p=age.dna?numero=3D284On 13/06/2011, at 12:43 PM, Olin Lagon wrote:
Aloha all, am trying to work =with an API that posts an XML doc. I can get it to post but it is not =setting the XML to a formvariable. Anyone know how I can grab the =contents of the post?Here is the test code to show what is hitting our server[writefile log.txt]http header---------------[listmimeheaders][name] =3D [value][/ListMIMEHeaders]form vars---------------[formvariables][name] =3D [value][/formvariables][/writefile]And here is the response. As you can see the form vars are empty :(Thanks! Olinhttp header---------------HOST =3D www.kanuhawaii.orgConnection =3D CloseContent-Type =3D application/xmlmsg-timestamp =3D 1307900329Content-Length =3D 81form vars------------------------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/l=ist/talk@webdna.usBug Reporting: support@webdna.us
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/l=ist/talk@webdna.usBug Reporting: support@webdna.us
= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: = archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail-5-1067829716-- Stuart Tremain

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:

Field Contents Raw (1999) question: webdelivery folder and file (1997) Major bug report on rootbeer (1997) HomePage Caution (1997) Shopping carts and reloading pages (1997) Filling in fields conditionally (1998) Cannot calculate prices (1997) Claris HomePage messes up the code (1997) Oracle XE (2006) WebCat2 - Getting to the browser's username/password data (1997) windows 95 netscape 3.01 browser bug? (1997) OT : Site speed feedback (2002) Cart doesn't interpret tag! (1997) I can help! (1996) French characters in variables (2001) ShipCosts database (1997) WCS Newbie question (1997) [isfile] ? (1997) E-mailer error codes (1997) Checking Credit Card No (2007)