Why I get 411 Length required error?

前端 未结 8 1833
我寻月下人不归
我寻月下人不归 2020-12-04 19:01

This is how I call a service with .NET:

var requestedURL = \"https://accounts.google.com/o/oauth2/token?code=\" + code + \"&client_id=\" + client_id + \"         


        
8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 19:36

    Hey i'm using Volley and was getting Server error 411, I added to the getHeaders method the following line :

    params.put("Content-Length","0");
    

    And it solved my issue

提交回复
热议问题