Dart Documentationpub.httpPubHttpException

PubHttpException class

Exception thrown when an HTTP operation fails.

class PubHttpException implements Exception {
 final http.Response response;

 const PubHttpException(this.response);

 String toString() => 'HTTP error ${response.statusCode}: '
     '${response.reasonPhrase}';
}

Implements

Exception

Constructors

const PubHttpException(Response response) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
const PubHttpException(this.response);

Properties

final Response response #

final http.Response response

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => 'HTTP error ${response.statusCode}: '
   '${response.reasonPhrase}';