WFS PHP Wrapper for POST body Request

Sven Schroeter <[email protected]> Thu, 15 Aug 2019 17:05:33 +0200
Newsgroups gmane.comp.gis.mapserver.user
Message-ID <[email protected]>
Hi,

I'm using a WFS Wrapper written in PHP with following Code (MS Version 7.x):
...

try {
         $oMap = ms_newMapobj($mymapfile);
     } catch (Exception $e) {
         echo '<strong>Exception:</strong> ', $e->getMessage(), "\n";
         ms_ioresethandlers();
         $oMap->free();
         unset($oMap);
         exit;
     }

     $request = ms_newowsrequestobj();


     foreach ($_GET as $k=>$v) {
         $request->setParameter($k, $v);
     }

     foreach ($_POST as $k=>$v) {
         $request->setParameter($k, $v);
     }

     $oMap->owsdispatch($request);
     $contenttype = ms_iostripstdoutbuffercontenttype();

     //Objekt reset
     $oMap->free();
     unset($oMap);

       $buffer = ms_iogetstdoutbufferstring();
       header('Content-Type: application/xml; charset=utf-8');
       echo $buffer;

...

this works fine with GET Request or Post Requests sent from a form.
I have a problem with data I send over the body of a POST request.
So I can get to the data and hand it over, but how?
$postBody = file_get_contents('php://input');

I've already tested it with
$request->loadparams();

Any idea?
Thanks Sven

_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users