REST API headers
-
I’m developing a mobile application which interfaces with my WordPress site’s REST API.
In order to include a progress indicator, I need to be able to calculate the amount downloaded relative to the size of the JSON file. The application needs certain header’s to perform this function, specifically a “Content-Length”. This header doesn’t seem to be sent with the standard REST API and I was wondering how I can add it. Any thoughts?
I’ve found these links but haven’t been able to get it working, I’m looking for something that I can add to my theme’s “functions.php” similar to some custom endpoints that I’ve added.
– https://wordpress.stackexchange.com/questions/269110/creating-a-post-with-the-rest-api-curl-and-oauth-returning-401-error
– https://www.coditty.com/code/wordpress-rest-api-set-custom-headers
- The topic ‘REST API headers’ is closed to new replies.