NetTalk Central

Author Topic: Is ThisWebServer.Page Stored in p_web anywhere?  (Read 2984 times)

David

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Is ThisWebServer.Page Stored in p_web anywhere?
« on: December 27, 2011, 03:15:10 PM »
I have a web server that excepts posts of data.  If the data was xml, I would use p_web.GetValue('xml').... but it isn't xml, just text.  Is the body of the post stored in p_web anywhere?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Is ThisWebServer.Page Stored in p_web anywhere?
« Reply #1 on: December 27, 2011, 10:21:30 PM »
The whole incoming request is stored, so that's a start. You just need to strip off the Post data part. Try something like this;

x = instring('<13,10,13,10>', p_web.RequestData.DataString, 1, 1)
if (x > 0) and (x+4 <= p_web.RequestData.DataStringLen)
   p_web.SetValue('postdata',p_web.RequestData.DataString[(x+4) : p_web.RequestData.DataStringLen])
end

Then the postdata is in p_web.GetValue('postdata')

Cheers
Bruce

David

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Re: Is ThisWebServer.Page Stored in p_web anywhere?
« Reply #2 on: December 28, 2011, 05:33:51 AM »
Thank you Bruce... that was what I was looking for.