Giter Site home page Giter Site logo

Comments (5)

mevdschee avatar mevdschee commented on May 8, 2024 1

Sure, but without any context of your hosting environment it is hard for me to help you. I think you are running IIS, based on your output. In "IIS Manager" go to "Handler Mappings" and click "Edit" on the ".php" handler. Then go to "Request Restrictions" and the "Verbs" tab. Now select the "All verbs" option to allow all verbs.

from php-crud-api.

jahu avatar jahu commented on May 8, 2024

The same happens with PUT request.

from php-crud-api.

mevdschee avatar mevdschee commented on May 8, 2024

Don't send a body on a DELETE. What is the PUT you are trying to execute?

from php-crud-api.

mevdschee avatar mevdschee commented on May 8, 2024

I don't think the script ever sends a 400:

$ grep header api.php
            header('Content-Type:',true,404);
            header('Content-Type:',true,403);
            header('Content-Type:',true,409);
            header('Content-Type:',true,422);

So, this must have been sent by your web browser (Apache, IIS, nginx).

from php-crud-api.

jahu avatar jahu commented on May 8, 2024

I am wondering whether it is not related to my hosting policy. I've tried to use DELETE without payload, the same result. In PUT I've just entered fields I wanted to update in json (+ content type json in request header).

I've overcome this with custom php script for data deletion and update (I need it working now), however I will come back to this issue whenever I will have some spare time.

from php-crud-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.