How to reduce header size through browser in all api request?

86 views Asked by At

I am trying to make some API calls from my browser (Chrome or Brave) , but I noticed that the browser automatically adds some headers to my requests which makes every API not working, Giving such error in postman (if i add whole header sent through browser CURL) and browser console:

HTTP Status 400 – Bad Request POST https://uat-example.com:31554/fetchPendingActionsCount?pageNumber=1&pageSize=10&categoryPurpose=IBFT&fromRecordedDate=2023-10-31&toRecordedDate=2023-11-01 net::ERR_CONNECTION_CLOSED

While If i try in postman , removing headers Such as :

  • authority
  • accept
  • accept-language
  • sec-fetch-dest
  • sec-fetch-mode
  • sec-gpc
  • user-agent

I found that API would successfully hit through postman .

Is there any way not to send header automatically through browser or manipulate , what is being sent to every requests.

Thank you for your help :) .

0

There are 0 answers