How to I send POST parameters in this android studio code [duplicate]
问题 This question already has answers here : Sending POST data in Android (15 answers) Closed 2 years ago . I'm new to android and learning it now. I'm working on an application where I was able to get response form a get request successfully. Now I want to execute a POST request with a single parameter this is what I've came up with so far: public class BGTask extends AsyncTask<String, String, String > { @Override protected String doInBackground(String... params) { HttpURLConnection connection =