S
sbbe83
Guest
Hi All, I am trying to create a sample Web application using the PAS Web Transport and I have a couple of questions. So far I have a WebHandler class that implements Progress.Web.IWebHandler and I am able to get a basic web request to go through and output a very simple HTML page. You can see the sample below. So onto my questions: 1.) How can I get POST data if said request was submitted via a form? I see I can get URI data from the URI property on the WebRequest but I am at a loss on how to get anything outside of this. In traditional WebSpeed I would just use get-value but I do not see anything similar to this. 2.) This may be answered in #1 but if a file is uploaded via a form is this something that can be grabbed as well? In traditional WebSpeed you get use the get-binary-data but I am not able to verify this works as of yet so I want to make sure I am going to right directions. Thanks for you time. Chris Ebbs /* SAME WEBHANDLER CLASS */ routine-level on error undo, throw. class System.WebHandler implements Progress.Web.IWebHandler: method public integer HandleRequest( ): def var poRequest as class OpenEdge.Web.WebRequest no-undo. def var poResponse as class OpenEdge.Web.WebResponse no-undo. def var poResponseWriter as class OpenEdge.Web.WebResponseWriter no-undo. poRequest = new OpenEdge.Web.WebRequest(). poResponse = new OpenEdge.Web.WebResponse(). poResponseWriter = new OpenEdge.Web.WebResponseWriter( poResponse ). poResponse:SetHeader("Content-Type", "text/html"). poResponseWriter:Open(). poResponseWriter:Write(' This is a test '). poResponseWriter:Flush(). poResponseWriter:Close(). delete object poRequest. delete object poResponse. delete object poResponseWriter. return 0. end method. end class.
Continue reading...
Continue reading...