Giter Site home page Giter Site logo

Comments (2)

ahmadnassri avatar ahmadnassri commented on June 13, 2024

the request payload IS being posted, but you are not setting the Body's Content-Type header ... or you are setting the wrong Content-Type header.

(I'm almost 99.9% certain this is the issue since I've been asked this all week, plz stop reading if that's not the case and let me know otherwise)

PHP (and other languages) expects the Content-Type header to be set to application/x-www-form-urlencoded so it would parse this string username=myun&password=mypw into a $_POST variable ... (and subsequently get picked up by Symphony and any other Framework as request parameters)

while this is a "typical" behavior for sending data through HTML forms, its not limiting, you can send a payload of username=myun&password=mypw and tell the server its application/xml if you wish ... its up to the client library to determine what to set the Content-Type header to, and to the server to determine how interpret the request body as, based on the Content-Type header it receives ...

in the previous version I had set that field to be set to application/x-www-form-urlencoded by default, since most of the time that is the case, but in this version I left everything bare so that the developer can decide where to start.

I thought it wasn't an issue, but based on how many people have complained about POST data not being sent, maybe I'll make it pre-populated again, but a little background info doesn't hurt ...

from app-restconsole.

gabehayes avatar gabehayes commented on June 13, 2024

That definitely did the trick...sorry for the troubles

from app-restconsole.

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.