Commit graph

1 commit

Author SHA1 Message Date
dec72c678f feat: Implement POST form submission
Add full support for POST method form submissions alongside existing GET support.

Changes:
- Add HttpClient::post() method with configurable Content-Type
- Implement URL encoding for form data (RFC 3986 compliant)
- Update Browser::submit_form() to detect and handle both GET and POST methods
- Add proper form data encoding with special character handling
- Include Content-Type header for POST requests

Features:
- Automatic method detection from form's method attribute
- URL-encoded form data (application/x-www-form-urlencoded)
- Proper encoding of special characters (spaces, &, =, etc.)
- Status messages for form submission feedback
- History tracking for POST responses

Testing:
- Add test_post_form.html with GET, POST, and special character test cases
- Uses httpbin.org endpoints for validation

Resolves TODO at browser.cpp:238 - POST handling is now fully implemented.
2025-12-25 14:12:07 +08:00