Pass Parameter with Volley POST

后端 未结 3 1970
旧巷少年郎
旧巷少年郎 2020-12-01 11:41

I was able to call an HTTP endpoint using Postman and these parameters:

{
    \"name\":\"Val\",
    \"subject\":\"Test\"
}

However I am una

3条回答
  •  眼角桃花
    2020-12-01 12:02

    Add the content type in the header

    @Override
    public Map getHeaders() throws AuthFailureError {
    HashMap headers = new HashMap();
    headers.put("Content-Type", "application/json; charset=utf-8");
    return headers;
    }    
    

提交回复
热议问题