Your SAS programs, embedded in web apps and elsewhere

How to pick up POST data from JavaScript in a Stored Process

Reply
N/A
Posts: 1

How to pick up POST data from JavaScript in a Stored Process

I have a javaScript applications made using Sencha Ext-JS which displays a grid I have populated with data from SAS and allows the user to update the grid. When the update is made it calls a stored process and uses the POST method to pass JSON data to it representing the changes that were made in the grid. When I run this in Chrome I can see the "Request Payload" as the Chrome debugger calls it, which shows the JSON string being passed to the stored process. However in the stored process I cant workout how to access this POST data. In the past I have often used forms with the GET method and parameters are passed as part of the URL, so they are easily able to be picked up in the stored process. However with this POST method I dont know where they are. I suspect they are probably in some kind of stream, and so I probably need to define a new data source for the stored process to read. I tried a few variations on this, which didnt work - and it doesnt seem to be very extensively documented.

Please can you tell me how to read the POST data sent from javaScript from my Stored Process?

thanks

Phil Mason

Frequent Contributor
Posts: 106

Re: How to pick up POST data from JavaScript in a Stored Process

Hi Phil,

It's much simpler than that - they should be no different to the GET requests. How are you adding the POST payload in ExtJS?

Ask a Question
Discussion stats
  • 1 reply
  • 464 views
  • 0 likes
  • 2 in conversation