Headers sent by the Proxy
Mashape adds additional headers to both the request and the response. It is important as a consumer or a provider to understand what headers are being sent by the proxy. Being aware of these details, outlined below, will save you a lot of time when coding functionalities on your end.
Table of Contents
Headers sent as response
When consuming an API through Mashape, you will always receive the following headers appended to the response:
The current version of the proxy used by Mashape.
"true" when the response has beenentirelygenerated by Mashape and not by the API. You will see this header, for example, when the API is temporary down or when you use invalid Mashape credentials.
Headers sent to the request
If you are an API provider, you will receive some additional headers appended in the request:
This is a secret unique key for every API that is appended by the proxy on every request. For high security, you can validate this secret server-side and check if it equals the key shown in the API Admin (under the Settings tab).
The name of the user that's making the request.
The name of the subscription (if any). The values can be:
CUSTOM(if the user is subscribed to a custom plan.)
The version of the proxy.
The IP address of the client making the request. It could be shown in a comma separated format like
"18.104.22.168, 22.214.171.124" where the first IP address belongs to the client and any subsequent IP represents a proxy.