2

I have a simple php file which just echoes $_POST['email']. I want to access it through rest client extension.

New extension looks totally different. This answer uses old extension.

I just added a check isset($_POST['email']). It returns else part data.

How do I post data with new extension?

Community
  • 1
  • 1
Gibbs
  • 21,904
  • 13
  • 74
  • 138

1 Answers1

3

Here's how to setup the request:

  1. Since you're accessing email in $_POST you'll need to choose the POST method
  2. Set the Content-Type to application/x-www-form-urlencoded
  3. Add the data form entries (in your case email=emailvalue)

enter image description here

Then your PHP script will be able to read the value of $_POST['email']

Nasreddine
  • 36,610
  • 17
  • 75
  • 94