I'm trying to figure out how to do get requests in QGIS using a bbox. I can get a bbox to clip a layer when I paste my uri into a browser but the EXACT same uri returns an empty layer in QGIS.
A simple easy to try specific example: The following uri returns 4 features when pasted into my browser.
http://ogi.state.ok.us/geoserver/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ogi:quad100&BBOX=-100,37,-99,38,EPSG:4326&SRSNAME=EPSG:4326
However the following lines create an empty layer (either pasted in to the console or run as a script)
sourceUri = "http://ogi.state.ok.us/geoserver/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ogi:quad100&BBOX=-100,37,-99,38,EPSG:4326&SRSNAME=EPSG:4326"
vlayer = QgsVectorLayer(sourceUri, "QUADS", "WFS")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)
Interesting to note that without the crsurl I need to swap the lat/lon order to correctly clip data in the browser. with or without the crsurl and which ever lat/lon order I use in QGIS I still get an empty layer.
As far as I can tell my uris are correct (They certainly generate a correct result in a browser) So why Doesn't QGIS get any data? It would be a shame to have to write my own HTML/XML post/parse script in python just because I'm missing some small aspect of QGIS