printHttpResponse method

void printHttpResponse(
  1. Response response
)

Prints the HTTP response to the console.

This method is useful for debugging purposes. It prints the status code, reason phrase, and body of the HTTP response.

  • response: The HTTP response to be printed.

Implementation

void printHttpResponse(http.Response response) {
  print(
      "response.statusCode: ${response.statusCode}, \nresponse.reasonPhrase: ${response.reasonPhrase}, \nresponse.body: ${response.body}");
}