且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

排球 - 发送使用JSONArrayRequest POST请求

更新时间:2023-01-03 13:32:14

他们很可能会在以后添加,但在此同时,您可以添加想要的构造自己:

They're probably going to add it later, but in the meanwhile you can add the wanted constructor yourself:

public JsonArrayRequest(int method, String url, JSONObject jsonRequest,
        Listener<JSONArray> listener, ErrorListener errorListener) {
    super(method, url, (jsonRequest == null) ? null : jsonRequest.toString(), 
        listener, errorListener);
}

这是没有测试过,但我看不出有任何理由,这应该无法工作,因为实施细则都在超类: JsonRequest

This isn't tested, though I see no reason this shouldn't work since the implementation details are in the super class: JsonRequest.

试一试,看看是否可行。

Try it and see if it works.

我把它叫做!他们花了近两年后,我回答了这一点,但凌空团队的补充此构造3月19日到2015年回购。你猜怎么了?这是确切的语法。

I called it! It took them almost two years after I answered this but the Volley team added this constructor on March 19, 2015 to the repo. Guess what? This is the EXACT syntax.