1

so I make this manual POST request:

Headers

User-Agent: Fiddler
Host: myhost.com
Content-Length: 11
Content-Type: multipart/form-data; boundary=xYzZY
Te: deflate,gzip;q=0.3
Connection: close

Request Body:

from=lalala

But then inspecting the $_POST variable from the site reveals that the variable is empty...

If I make it application/x-www-form-urlencoded, though

User-Agent: Fiddler
Host: myhost.com
Content-Length: 11
Content-Type: application/x-www-form-urlencoded; boundary=xYzZY
Te: deflate,gzip;q=0.3
Connection: close

The $_POST variable would get populated correctly...

Why didn't the $_POST variable get populated when using multipart/form-data? How do I go about making it work using multipart/form-data?

1 Answer 1

1

Because multipart/form-data is in a totally different format. You supplied the application/x-www-form-urlencoded format in both cases.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.