set cookies/headers for webview via code for Win Store App

前端 未结 2 510
挽巷
挽巷 2020-12-19 16:04

I want to set cookies for my webview via the code. I know it was not possible in windows phone. But is it now possible in windows 8? Can anyone guide me?

<
2条回答
  •  时光取名叫无心
    2020-12-19 16:23

    Sorry but the WebView control won't do that for you.

    You can acomplish what you want creating a custom WebRequest with the desired headers, and then call WebView.NavigateToString() with the content of the WebResponse.

提交回复
热议问题