Problems with a Build_HttpBody() // httpPost.setEntity() - Android

后端 未结 2 583
孤街浪徒
孤街浪徒 2020-12-22 00:29

I develop AndroidApps with AndroidStudio I start to do a simple HttpPost Request and I had a problems, all post that I could find do this:

private void Check         


        
2条回答
  •  眼角桃花
    2020-12-22 01:05

    You are obviously not handling the IO exceptions being thrown from the constructor:

    see: Android docs on UrlEncodedFormEntity

    What puzzles me is that your IDE is not reporting this, or how this code even compiles, let alone runs/debugs.

    Edit: If you are new at this stuff, maybe it would be worth to take a look at: Android Volley , which is a quite simple yet effective library developed by Google for Android networking.

提交回复
热议问题