[Users] WFS GET vs POST request

Espen Isaksen espen.isaksen at gmail.com
Fri Feb 24 15:25:14 CET 2012


Ok, thanks Andreas.

Just for reference, I rewrote my protocol to this:

var grenseProtocol = new OpenLayers.Protocol.HTTP({
    url: 'http://localhost/wfs',
    params: {
    	outputformat: "geojson",
    	service: "WFS",
    	request: "GetFeature",
    	srs: "EPSG:32633",
    	version: "1.0.0",
    	typename: "lib_matrikkel_flate",
    	jobid: "8719c5"
    	
    },
    format: new OpenLayers.Format.GeoJSON()
});





On Fri, Feb 24, 2012 at 2:05 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> Hi,
>
> OpenLayers.Protocol.WFS does not do GET requests. If you just want to
> do a GetFeature request, you can use Protocol.HTTP instead.
>
> Andreas.
>
> On Fri, Feb 24, 2012 at 12:02 PM, Espen Isaksen <espen.isaksen at gmail.com> wrote:
>> I have tried for a while to find the answer to this question, but no
>> luck unfortunately.
>>
>> I have a WFS request running from my code:
>>
>>
>> var protocol = new OpenLayers.Protocol.WFS({
>>    url: 'http://localhost/wfs',
>>    version: "1.0.0",
>>    featureType: "lib_matrikkel_flate",
>>    featureNS: "",
>>    srsName: "EPSG:32633"
>>    //,format: new OpenLayers.Format.GeoJSON()
>> });
>>
>> var proxyProtocol = new GeoExt.data.ProtocolProxy({
>>    protocol: protocol
>> });
>>
>> var store = new GeoExt.data.FeatureStore({
>>    layer: propertyBorder,
>>    proxy: proxyProtocol,
>>    autoLoad: true
>> });
>>
>>
>> This runs a POST request. I would like it to do a GET request instead.
>> Setting method: "GET" on the ProtocolProxy does not work. How can I
>> change from a POST request to a GET request?
>>
>> Espen
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.


More information about the Users mailing list