Why I get 411 Length required error?

前端 未结 8 1856
我寻月下人不归
我寻月下人不归 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

    I had the same error when I imported web requests from fiddler captured sessions to Visual Studio webtests. Some POST requests did not have a StringHttpBody tag. I added an empty one to them and the error was gone. Add this after the Headers tag:

        
      
    

提交回复
热议问题