【问题标题】:How to post base64string data to webview with URL?如何使用 URL 将 base64string 数据发布到 webview?
【发布时间】:2019-04-15 06:07:07
【问题描述】:

我正在开发支付网关,我想使用 hash_hmac sha512 以加密哈希格式传递一些数据,然后使用 Base64 转换输出。 我有将生成的 base64 字符串数据发布到 webview 的 URL。

我是 aba 支付新手。我试过发布数据,它总是给出类似 403 禁止错误的错误。

我希望通过 URL 在 webview 中发布数据的方式或代码。

【问题讨论】:

    标签: android android-webview


    【解决方案1】:

    如果你想用 url 以 base64 形式发布数据并在 webview 中加载,那么你可以使用这个代码。

    String url = "http://your_url.com";
    String postData = "your_data_you_want_to_post";
    your_wv.postUrl(url, EncodingUtils.getBytes(postData, "BASE64"));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-05
      • 1970-01-01
      • 2013-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多