Answers for "how to use asynctask to make api connection"

0

how to use asynctask to make api connection

public class SomeOtherClass {   //Some url endpoint that you may have   String myUrl = "http://myApi.com/get_some_data";   //String to place our result in   String result;   //Instantiate new instance of our class   HttpGetRequest getRequest = new HttpGetRequest();   //Perform the doInBackground method, passing in our url   result = getRequest.execute(myUrl).get();}
Posted by: Guest on August-23-2020

Browse Popular Code Answers by Language