Sending POST parameters with Postman doesn't work, but sending GET parameters does

前端 未结 10 767
名媛妹妹
名媛妹妹 2020-12-02 10:04

I\'m trying to test a simple PHP page using the Chrome extension Postman. When I send URL parameters, the script works fine (eg the variables are available in the $_RE

10条回答
  •  我在风中等你
    2020-12-02 11:03

    Check your content-type in the header. I was having issue with this sending raw JSON and my content-type as application/json in the POSTMAN header.

    my php was seeing jack all in the request post. It wasn't until i change the content-type to application/x-www-form-urlencoded with the JSON in the RAW textarea and its type as JSON, did my PHP app start to see the post data. not what i expected when deal with raw json but its now working for what i need.

    postman POST request

提交回复
热议问题