Help Center/ Content Delivery Network/ FAQs/ Domain Name Settings/ After Force HTTPS Is Enabled, Why Are Parameters Missing in a POST Request When I Call an API Using HTTP?
Updated on 2024-08-15 GMT+08:00

After Force HTTPS Is Enabled, Why Are Parameters Missing in a POST Request When I Call an API Using HTTP?

A 301/302 redirect is a practical way of redirecting requests from HTTP to HTTPS. If a client does not send a request to the new URL, parameters will be missing, causing no response. A browser can receive a response because the browser submits parameters again after receiving a 301/302 status code. Therefore, after the client receives a 301/302 status code, the client needs to send a request again with target parameters carried.

If you want to open up APIs and enable force HTTPS, you are advised to set the API to https://endpoint/{url} to prevent missing parameters during 301/302 redirect when an API request is sent.