This is a migrated thread and some comments may be shown as answers.

Kendo DataSource Transport Usage and Error 405

1 Answer 14 Views
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 27 Jan 2019, 08:47 PM

Dear All,

I'm trying to use Kendo Grid and DataSource Tranposrt as following:

<kendo-datasource ref="employeesData"
:transport-read-url="'http://api.example.com/api/users'"
:transport-read-type="'GET'"
:transport-read-data-type="'json'"
:transport-read-content-type="'application/json'"
:transport-update-url="'http://api.example.com/api/users'"
:transport-update-type="'PUT'"
:transport-update-content-type="'application/json'"
:transport-update-data-type="'json'"
:transport-destroy-url="'http://api.example.com/api/users'"
:transport-destroy-type="'DELETE'"
:transport-destroy-data-type="'json'"
:transport-create-url="'http://api.example.com/api/users'"
:transport-create-type="'POST'"
:transport-create-data-type="'json'"
:transport-parameter-map="parameterMap"
:schema-model-id="'id'"
:schema-model-fields="schemaModelFields"
:batch='true'
:page-size='15'>
</kendo-datasource>

 

When I try to update row by Edit, I receive the following message:

PUT http://api.example.com/api/users 405 (Method Not Allowed)

{message: "", exception: "Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException",…}

   exception: "Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException"

   file: "/var/www/api.leanapy.com/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php"
   line: 255
   message: ""

The same for DELETE

My API works fine when I use Vue (bootstrap-vue) and Vuex.

Appreciate if you can advice the way to solve it.

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 30 Jan 2019, 06:54 AM
Hello Dmitry,

The 405 error occurs when the method specified in the Request-Line is not allowed for the resource identified by the Request-URI. I assume that the api is configured to accept another method.

Could you please make sure that the service you are requesting is accepting PUT requests?


Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or