0

How do you load a URL with post data using the "POST" method into GeckoView? On the Android WebView I can do this:

view.postUrl(url, postParams.getBytes())

I have tried this with GeckoView but it doesn't work:

session.load(new Loader().data(postParams.getBytes(), null).uri(url));
Daniel Wilson
  • 18,838
  • 12
  • 85
  • 135

1 Answers1

0

If anyone is interested, this is not currently built in to the library. From a GeckoView chat:

I don't think there's a way to directly load a page passing POST data at the same time. You can download a file that requires POST data using GeckoWebExecutor.fetch https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoWebExecutor.html#fetch-org.mozilla.geckoview.WebRequest- not sure if that's helpful.

Daniel Wilson
  • 18,838
  • 12
  • 85
  • 135