How to use http post method to call php webservice in android?

后端 未结 4 1811
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-22 04:27

I\'m calling php webservice through http post method. I\'m sending the request in the proper way, but when responce comes, it is not giving me response.

That\'s what I h

4条回答
  •  佛祖请我去吃肉
    2021-01-22 05:07

    Perhaps you want to do something similar to the following.

      HttpResponse response = client.execute(request);
      StatusLine status = response.getStatusLine();
      if (status.getStatusCode() == HttpStatus.SC_OK)
      {
        ResponseHandler responseHandler = new BasicResponseHandler();
        String responseBody = responseHandler.handleResponse(response);
        ...
      }

提交回复
热议问题