GET & POST Request

For educational purposes only.


How to Use This Demo

This page demonstrates handling of GET and POST requests, including basic file upload.

1) Test a GET Request
  1. Open this page and append query parameters to the URL, for example:
    https://dev.fare4z.com/?name=Ali&course=Web&interests[]=JS&interests[]=CSS
  2. The page will display the current URL and a table of your GET parameters.
2) Test a POST Request (no file)

Example use an HTML form

<form method="POST" action="https://dev.fare4z.com/">
        <input type="text" name="name" placeholder="Name" required> <br>
        <input type="text" name="course" placeholder="Course" required> <br>
        <input type="text" name="interests[]" placeholder="Interest (e.g. JS)" required> <br>
        <input type="text" name="interests[]" placeholder="Interest (e.g. CSS)" required> <br>
        <button type="submit">Submit</button>
        </form>

Use any HTTP client (HTML form, Postman, or cURL). Example with cURL:

curl -X POST https://dev.fare4z.com/ \
  -d "name=Ali" \
  -d "course=Web" \
  -d "interests[]=JS" \
  -d "interests[]=CSS"
3) Test a POST Request with File Upload
  • Field name must be: uploadedFile
  • Allowed types: JPG, JPEG, PNG, GIF, PDF, TXT

Example with cURL (multipart/form-data):

curl -X POST https://dev.fare4z.com/ \
  -F "name=Ali" \
  -F "course=Web" \
  -F "uploadedFile=@/path/to/file.txt"
4) Notes
  • If no GET/POST data is sent, you will see the message: No POST or GET request received.
  • For large files, ensure your server limits (e.g., upload_max_filesize, post_max_size) are sufficient.
No POST or GET request received.