HTTP Headers
Preference-Applied header
Preference-Applied response header serves as a notification from the server to the client, confirming which specific directives from the initial Prefer request header were successfully honored.This header ensures transparency in communication, allowing the client to know exactly how its requested preferences influenced the server’s processing of the resource.
- Header type: Response header
- Forbidden header name: No
- CORS-safelisted response header: No
Syntax
Preference-Applied: <preference>
Directives
Example
Applying Timezone Preferences
GET /events HTTP/1.1
Host: example.com
Prefer: timezone=America/Los_AngelesIf the server supports this localization, it will process the request and include a Preference-Applied header in the response to confirm the setting was used.
HTTP/1.1 200 OK
Content-Type: application/json
Preference-Applied: timezone=America/Los_Angeles
[
{"t":"2023-10-18T05:37:59.611-07:00"},
{"t":"2023-10-18T07:37:59.611-07:00"},
{"t":"2023-10-18T09:37:59.611-07:00"}
]How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Preference-Applied header. This response header indicates which preference from the Prefer request header was honored by the server. It is useful when testing how your API acknowledges client preferences during development or debugging. Steps to Modify the Preference-Applied Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- Choose to modify Response Headers.
- In the “Header Name” field, enter Preference-Applied.
- In the “Header Value” field, enter the applied preference (for example, return=minimal).
- Set the URL condition: Specify the URL or pattern where this header should apply (for example, https://your-api.com/*).
- Save the rule.
Once configured, Requestly will inject the Preference-Applied header into all matching responses. This allows you to simulate how a server confirms that a specific client preference was honored.
You might need to modify the Preference-Applied header to test API behavior, validate client-server preference handling, or debug conditional response logic without modifying your backend code. This helps ensure your API communicates applied preferences clearly and correctly.
Table of Contents
- No headings found.





