How to set http header in uiwebview if loading view with loadHTMLString

前端 未结 1 1586
故里飘歌
故里飘歌 2021-01-06 16:32

I have a UIWebView that i am loading using loadHTMLString and i need to set cookies on the request header. I know how to do this using loadRe

1条回答
  •  情话喂你
    2021-01-06 17:33

    There will not be any difference between loading web view from loadRequest vs loadHTMLString method, shouldStartLoadWithRequest method will be called in both cases. You can override your headers there and add header as per your requirements.

    0 讨论(0)
提交回复
热议问题