Replies: 1 comment
|
You can't set arbitrary request headers on a plain
import { CapacitorHttp } from '@capacitor/core'
const response = await CapacitorHttp.get({
url: 'https://example.com/page',
headers: { 'X-Custom-Header': 'value' },
responseType: 'text',
})
const html = response.dataThen render that HTML inline with an
If the page needs to keep working as a live, interactive site (not just a static render) and you don't strictly need those custom request headers on every subsequent navigation inside it, |
Uh oh!
There was an error while loading. Please reload this page.
I used InAppBrowser.openInWebView to open 3rd page with custom headers. And it’s being shown using InAppBrowser. But I want to show the page under an html element directly. In react-native, it’s supported by using WebView tag from react-native-webview. Is this possibel in Ionic capacitor also?
All reactions