s is a reserved keyword, you cannot reuse the URL parameters and query variables used by WordPress itself. This issue is unrelated to the API request code.
Because your form has an input with the name s, the request is interpreted as a search request. As no posts were found in the WordPress search, you got a 404 response.
As a general rule of thumb, if a parameter is listed in the documentation as valid in a WP_Query post query object, it is unavailable for use in URLs.
Changing WordPress to allow s to be used would cripple a large portion of WordPress core functionality and require extensive internal modification of WordPress itself, as well as disabling all search related functionality, and any plugins that use similar systems, both on the frontend and in WP Admin.
Related Posts:
- Is there a way to follow redirects with command line cURL?
- How to send a header using a HTTP request through a cURL call?
- How can I set the request header for curl?
- How to display request headers with command line curl
- How to fix libeay32.dll was not found error
- cURL to show response headers after submiting a file
- wget/curl large file from google drive
- curl: (35) SSL connect error
- How do I make curl ignore the proxy?
- SSL CA cert (path? access rights?)
- How do I measure request and response times at once using cURL?
- cURL equivalent in Node.js?
- Curl Error 56 “Failure when receiving data from the peer” while sending .tar.gz File
- Run Rsync from Python [duplicate]
- wp_remote_get vs. file_get_contents vs. cURL?
- wp_remote_get – cURL error 28 – only on same domain
- cURL – How to send and fetch data in WordPress
- How to convert this cURL to wp_remote_get?
- cURL RETURNTRANSFER function in wp_remote_post
- How to convert this cURL to wp_remote_*?
- XML-code sent via the POST method to the URL (API) [closed]
- How to send file by wp_remote_post?
- Download file using cURL into wp-includes/uploads
- cURL request to plugin repository fails 403
- Curl error while creating user
- Inconsistencies between wp_remote_post and cURL
- Set wordpress auth cookie from external site?
- Does wp_remote_post() require curl?
- Get full page HTML for a non-public WordPress page
- How to use the HTTP API (wp_remote_get) instead of cURL?
- Difference between `curl -I` and `curl -X HEAD`
- wp_remote_post vs curl to send data in WordPress plugin
- After upgrading WordPress, I am getting the following error. Error message: cURL error 52: Empty reply from server
- How do I POST JSON data with cURL?
- curl: (60) SSL certificate problem: unable to get local issuer certificate
- How do I install and use cURL on Windows?
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- https connection using CURL from command line
- Curl command for https ( SSL )
- PHP + curl, HTTP POST sample code?
- What is the curl error 52 “empty reply from server”?
- curl: (6) Could not resolve host: google.com; Name or service not known
- Call to undefined function curl_init().?
- cURL error 60: SSL certificate: unable to get local issuer certificate
- Binary Data Posting with curl
- What exactly is cacert.pem for?
- PHP cURL custom headers
- Why does cURL return error “(23) Failed writing body”?
- cURL request in Laravel
- Is it safe to use sslverify => true for with wp_remote_get/wp_remote_post
- Filter any HTTP request URI?
- How to use the HTTP API with a Proxy?
- Mutual Authentiction on HTTPS with WordPress HTTP API?
- How to use WordPress HTTP API to download file from remote location
- Error timed out with succesfull wp_remote_post
- Re use authenticated HTTP connection or cUrl handle
- How to consume and display external data in WordPress from another website
- Passing .pem and .key files in cURL doesn’t work in WordPress
- parse XML from URL (via SOAP)
- API JSON Data in WordPress
- Storing an XML Response (Transient)?
- What is the official way to consume the WordPress API? (api.wordpress.org)
- Posting an XML request using HTTP API
- Allow download_url for lan addresses
- Is it possible to process $_POST / inbound http request in way to automatically create WordPress post?
- wp_remote_post with ssl:// protocol
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- Use wp_remote_get to get JSON instagram feed from public profile
- Login WordPress website using wp-rest api
- Does WordPress’s HTTP API use any caching?
- On Plugin Activation, How Do I Check for Proper Transport Mechanism?
- Problem with cURL and rest API
- Cache WP remote_get HTTP Response using Transients
- Sending JSON Payload using Request::request_multiple()
- Return WP_Error as WP_REST_Response
- How do I create an rssfeed from the contents on this page?
- WP http XML response HTML encoding and image display problems
- WordPress from url get external source title
- curl problem or permalinks
- Using PODS data with save_post
- http_response_timeout filter not working
- Get single item from cURL plugin API call inside bash [closed]
- Uploading a media item with the wp-json API to a specific path
- How to set a header in wp_safe_remote_get()?
- Use WordPress user database in external php application
- Error: Can´t access facebook comment plugin admin page
- Need help creating asynchronous data scraper in WordPress
- Get the name WordPress default theme in the core
- Installation failed: 504 – Gateway Timeout
- Hide response returned from WordPress REST API call
- mysqli_query(): MySQL server has gone away for Curl Request
- Update products with curl (bash)
- Using WP_Http to post data to Webservice without blocking caller script
- Installation problem with wordpress xampp
- How to use wp_http with https-pages?
- Using the wp_remote_post response body
- Create plugin/function to catch XML-data via Shortcode
- cURL error 28: SSL connection timeout while can download the plugin file
- Curl: disable certificate verification
- Trouble Sending Elementor Form Data via cURL in WordPress