How it works...
In this recipe, we used the ZAP proxy to intercept a valid request in which the server analyzed the header section. We modified the header and verified that the server actually took the value we would provide.
First, we made a test request and discovered that the User-Agent header was being used by the server. Knowing that, we made a valid request and intercepted it with the proxy; this allowed us to see the request once it left the browser. Then we changed the header so the User-Agent contained the information we wanted it to contain and submitted the request to the server, which took and displayed the value we provided.
Another option to change the User-Agent without the need to intercept and manually change requests is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access