koopjs / koop

Transform, query, and download geospatial data on the web.
http://koopjs.github.io
Other
659 stars 127 forks source link

Method not supported #337

Closed sahbijabnouni closed 5 years ago

sahbijabnouni commented 5 years ago

Hi ,

I got a "Method not supported" error when enabling hosts:

const provider = { type: 'provider', name: 'iasworld', hosts: true, disableIdParam: false, Controller: require('./controller'), Model: require('./model'), routes: require('./routes'), version: require('./package.json').version }

The request was sent successfully but, I got the error when calling the callback to return data.

rgwozdz commented 5 years ago

@sahbijabnouni - please post the request url so I can take a look.

sahbijabnouni commented 5 years ago

iasworld/ias/PARCEL_METADATA_TAXYR/FeatureServer/0/query?dbfilters=taxyr=2008

pattern: :provider/:host/:id/FeatureServer/0/query

rgwozdz commented 5 years ago

Ok. Can you attach or link to your provider code?

sahbijabnouni commented 5 years ago

https://drive.google.com/file/d/1xcNNrzZuD4e12DfUUtVc-2wmnQ6e4Cwj/view?usp=sharing

rgwozdz commented 5 years ago

@sahbijabnouni Do you get the Method Not Supported error with requests from the Esri JS API?

rgwozdz commented 5 years ago

You will get the Method Not Supported error when using the Esri JS API to register koop feature layers if you don't use the the routes with rest/services included in the url. So you would want to use:

iasworld/rest/services/ias/PARCEL_METADATA_TAXYR/FeatureServer/0/query?dbfilters=taxyr=2008