How to post boolean or integer value using volley

前端 未结 4 1631
予麋鹿
予麋鹿 2021-01-18 21:05

I want to post boolean,double data using volley library.I am not getting how to use it.Is there any other process.Thanks in advance.

Here is my method....

         


        
4条回答
  •  臣服心动
    2021-01-18 21:52

    JSONObject obj = new JSONObject();
    
    obj.put("isboolean",false)
    
    JsonObjectRequest req = new JsonObjectRequest(Constants.URL_PATH, obj,
                    new Listener() {
    
    
                @Override
                public void onResponse(JSONObject response) {
    
    
    }, new ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
    

提交回复
热议问题