Reputation: 356
How can I hide API service request from the network tab of the browser developer tool? Any suggestion?
Upvotes: 3
Views: 5630
Reputation: 1
This Nextjs RCS
import { NextPage } from "next";
import axios from "axios";
const Home: NextPage = async () => {
const { data } = await axios.get(
"your_api"
);
return (
<div>
{data.map((el: any, idx: number) => (
<div key={idx}>
<h3>{el.title}</h3>
</div>
))}
</div>
);
};
export default Home;
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
Upvotes: 0
Reputation: 26995
Although I would strongly disadvice from doing so (as it won't stop any serious user), it would be possible to for example send it through flash or for that matter any other plugin with such functionality. The easiest way to achieve this would be to use a flash-enabled XHR proxy object like the one provided by the flXHR
project (though you would have to force it to also function on the same domain, rather than only cross domain). Let me finish once again with not advicing you to do so, as the use of plugins will cause for a significant subset of your users messages to appear or not to work at all, which is in no way a good experience.
Upvotes: 1