NetTalk Central

Author Topic: How to get the complete HTTP data stream?  (Read 3261 times)

patrick de laet

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • ShopPlus
    • Email
How to get the complete HTTP data stream?
« on: October 14, 2015, 02:46:48 AM »
(Using NetTalk 5,45 (sorry  :-[ ) is used in an old Clarion 6.3 app.)

A JSON string is passed to my NetWebpage procedure.

JSON request:

{
"Login": "xxxx",
"Password": "yyyy",
"FiliaalID": "3"
}


How do I get the JSON string?

The following does the job for an XML string:
    pweb:DataJson         = p_web.GetValue('xml')

But how to I get the JSON string?

And if not possible in 5.45, how do I get the complete HTTP stream (headers and data)?

regards

Patrick De Laet



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: How to get the complete HTTP data stream?
« Reply #1 on: October 15, 2015, 06:46:21 AM »
In NT 8 you'd do;

DataJson         = p_web.GetValue('_json_')

At some point you could start doing

DataJson         = p_web.GetValue('_postdata_')

but I don't know if that was in NT 5 or not.

I think you can get the whole HTTP incoming text by doing;

Data = p_web.RequestData.DataString

Cheers
Bruce