I have some mivascript that receives raw data from an http post, not in name=value pairs. Is there a way to access it?
Announcement
Collapse
No announcement yet.
Access raw POSTED data
Collapse
X
-
Access raw POSTED data
Susan Petracco
NetBlazon
1.866.400.2444
_____________________________________________
Like us on FacebookTags: None
-
arg2 is empty.
But maybe the issue is on the sending script. I'll write something to post to it so I control the postER, and then I can see what the postEE does. Thanks Bill.
Susan Petracco
NetBlazon
1.866.400.2444
_____________________________________________
Like us on Facebook
Comment
-
I handled this for a project some years ago. I don't recall the details, but I think there's a Linux environment variable that contains the data you need; and there's a way to configure Miva to pass that environment variable to you as a system variable. Hope that helps --Kent Multer
Magic Metal Productions
http://TheMagicM.com
* Web developer/designer
* E-commerce and Miva
* Author, The Official Miva Web Scripting Book -- available on-line:
http://www.amazon.com/exec/obidos/IS...icmetalproducA
Comment
-
Kent and BIll, you two RULE. s.content_data is exactly where the information was landing. Thank you both!Susan Petracco
NetBlazon
1.866.400.2444
_____________________________________________
Like us on Facebook
Comment
-
I have to give thanks to Brennan for this one...
https://www.miva.com/forums/forum/designers-and-developers/mivascript-miva-merchant-empresa/115882-request-body-webhook
There is a little more info on the requirements at the above link.William Gilligan - Orange Marmalade, Inc.
www.OrangeMarmaladeinc.com
Comment
-
Did you check s.QUERY_STRING?
As for s.content_data Brennan referred to:
Is this something that has to be configured in Empresa?
Under what conditions is this variable populated?
I was planning up updating this page soon. http://www.mivascript.com/topic/system-variables.html and it would be good to know.Last edited by RayYates; 02-20-18, 09:34 AM.Ray Yates
"If I have seen further, it is by standing on the shoulders of giants."
--- Sir Isaac Newton
Comment
-
Ray - according to Brennan,
In version 5.18 or higher of Empresa there is a variable that may contain the request body. It is named s.content_data
The reason I say "may" is because this is only set if the Content-Type is not "application/x-www-form-urlencoded" or "multipart/form-data"
Reach out to Brennan for more info - there may even be more you can add to your update!
William Gilligan - Orange Marmalade, Inc.
www.OrangeMarmaladeinc.com
Comment
Comment