From 4108185150c2d9af8c48467ac38c653eb466477c Mon Sep 17 00:00:00 2001 From: Peter Mekhaeil <4616064+petermekhaeil@users.noreply.github.com> Date: Mon, 30 Dec 2024 21:23:00 +0800 Subject: [PATCH] Create devtools-overrides.md --- learnings/devtools-overrides.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 learnings/devtools-overrides.md diff --git a/learnings/devtools-overrides.md b/learnings/devtools-overrides.md new file mode 100644 index 0000000..1cde15b --- /dev/null +++ b/learnings/devtools-overrides.md @@ -0,0 +1,12 @@ +# Override web content and HTTP response headers locally + +Chrome DevTools allows you to override API responses and HTTP headers directly in the browser - this is a great feature for testing, debugging, and prototyping without modifying the backend. + +You can: + +- **Mock API responses**: Replace live API data with custom JSON or other content. +- **Modify HTTP headers**: Adjust headers like CORS, Content-Type, or authentication tokens to mimic different scenarios. + +You just need to enable "Local Overrides" in DevTools and edit the response or headers for the network requests you want to tweak. + +More details here: [Chrome DevTools Overrides](https://developer.chrome.com/docs/devtools/overrides)