2

I would like to load a POST request using SFSafariViewController, just like webView.loadRequest(request). But I find init(url:entersReaderIfAvailable:) accepts NSURL only. Is it possible to do POST?

yzyzsun
  • 367
  • 4
  • 11

2 Answers2

2

No, you can't. It's a browser not a webview.

Lumialxk
  • 6,239
  • 6
  • 24
  • 47
1

It's possible that you can do the request in advance, but I guess you're doing it to get cookies or something like that..

So, untested, but you could create a local web page that you load with some parameters, it executes the POST using JavaScript and after its complete it redirects (if required) to some other URL.

Wain
  • 118,658
  • 15
  • 128
  • 151