19
Views
2
Comments
[InAppBrowser Plugin] how to access Custom header?
inappbrowser-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

Is there any javascript code to access the custom header after setting it in OpenInWebView?


2025-08-07 06-30-56
Amit J
Champion

you can access the custom HTTP headers only at the point you make the request, not after.

  • When you use OpenInWebView with Custom Headers, those headers are sent only with that navigation request.

  • Browsers and WebViews don’t expose a “getRequestHeaders” API for a loaded page due to security restrictions (CORS, privacy).

  • Once the page is loaded, you cannot read back the headers you sent — they’re not available to JavaScript in the page. 


UserImage.jpg
benjamin kong

thanks for your reply. may i know then what is the best practice/method to pass tokens over to webviews?


Currently I have succeeded in passing token by postmessage using iframe. But this may not be ideal user experience. I am trying to embed a chatbot agent in mobile.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.