I am working on developing a plugin for a tool called Supportify. It is a REST API that is authenticated through a key and token added to the HTTP header of a HTTP request to their servers. Their API reference is here. I know you can add things to the header with wp-config.php
but for a publicly released plugin this is not feasible. Is there any way to do this through a plugin?
Add a comment
|
1 Answer
PHP allows you to send header information using the header()
command.
More specific to WordPress is the send_headers
action hook.
Also: always remember that you have to send all your headers before any output is sent to the screen.