0

I have a WFS GET Request, created by A WFS Layer in QGIS. However, for my program I need to have a POST Request. How do I convert the WFS GET request to a WFS POST request?

3
  • what is the GET request?
    – nmtoken
    Commented Aug 6, 2020 at 16:57
  • unfortunately, no
    – Lokomotywa
    Commented Aug 7, 2020 at 7:00
  • What didn't work? Does the WFS server not report POST support. Or do you get an error when posting a request. How did you test the POST,
    – nmtoken
    Commented Aug 7, 2020 at 8:00

1 Answer 1

1

I don't think there is any automatic way to do this, your best bet is to read the relevant standard for your version of the WFS server you are using.

It may be worth installing a local version of GeoServer that will allow you to experiment in the Demos section with (simple) WFS requests directly which is a little easier than messing with curl and vi when you are getting started.

3
  • Actually, the issue behind this problem is, that I have a URL of a WFS Service that I can successfully obtain data from with QGis, but I fail to load data from it with Open Layers 2 - While QGis seems to use GET only, OpenLayers 2 is determined to use POST. Making a Request with a given bounding box, OpenLayers always fails with 'sWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs'.
    – Lokomotywa
    Commented Aug 6, 2020 at 15:13
  • OpenLayers 2 is very old but I'm sure it used to use GET for wfs - anyway that is a different question to the one you asked.
    – Ian Turton
    Commented Aug 6, 2020 at 15:21
  • no, unfortunately it doesn't - using POST is hard-coded.
    – Lokomotywa
    Commented Aug 7, 2020 at 7:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.