MethodNotAllowedException class
The request method is known by the server but is not supported by the target resource.
E.g: an API may not allow calling DELETE to remove a resource, or it may not allow calling POST to create a new resource etc.
- Inheritance
-
- Object
- HttpException
- HttpClientException
- MethodNotAllowedException
- Implemented types
Constructors
- MethodNotAllowedException({required RequestOptions requestOptions})
Properties
- code → int
-
The HTTP exception code, e.g: 400, 401, 404 etc.
no setteroverride
- error → Object?
-
The original error/exception object;
It's usually not null when
type
isDioExceptionType.unknown
.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
The sentence to show for the exception.
no setteroverride
- requestOptions → RequestOptions
-
The request info for the request that throws exception.
finalinherited
- response → Response?
-
Response info, it may be
null
if the request can't reach to the HTTP server, for example, occurring a DNS error, network is not available.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace
-
The stacktrace of the original error/exception object;
It's usually not null when
type
isDioExceptionType.unknown
.finalinherited - title → String
-
The title of the exception, e.g: BadRequestException, UnauthorizedException
NotFoundException etc.
no setteroverride
- type → DioExceptionType
-
finalinherited
Methods
-
copyWith(
{RequestOptions? requestOptions, Response? response, DioExceptionType? type, Object? error, StackTrace? stackTrace, String? message}) → DioException -
Generate a new
DioException
by combining given values and original values.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited