postor library Null safety

Classes

PFile<T extends Object>
a wrapper around HTTP's MurtipartFile
PFileFromBytes
PFileFromPath
a wrapper around Dart's File class which will be used by Postor for processing files
Postor
the base class of Postor, a wrapper around http's Client which supports cancelling any HTTP request based on its request url.

Extensions

GetResponseExtension

Properties

defaultJsonDecoder ← _SyncAsyncJsonDecoderCallback
set default json decoder for GetResponseExtension.get
write-only

Functions

transformStatusCodeToException({required int statusCode, String? responseBody}) PException
an HTTP error code transformer

Typedefs

SC400 = BadRequestException
SC401 = UnauthorizedException
SC403 = ForbiddenException
SC404 = NotFound404Exception
SC405 = MethodNotAllowedException
SC406 = NotAcceptableException
SC408 = RequestTimeoutException
SC409 = RequestConflictException
SC413 = PayloadTooLargeException
SC415 = UnsupportedMediaTypeException
SC429 = TooManyRequestsException
SC431 = RequestHeadersTooLargeException
SC5XX = ProblemWithServerException

Exceptions / Errors

BadRequestException
400 Bad Request
CancelledRequestException
An exception that Postor throws in the event of request cancellation
ForbiddenException
403 Forbidden
MethodNotAllowedException
405 Method Not Allowed
NotAcceptableException
406 Not Acceptable
NotFound404Exception
404 Not Found
PayloadTooLargeException
413 Payload Too Large
PException
the base class for all Exceptions thrown by Postor; such as CancelledRequestException and all HTTP Status Code Exceptions.
ProblemWithServerException
5xx Server Errors
RequestConflictException
409 Conflict
RequestHeadersTooLargeException
431 Request Header Fields Too Large
RequestTimeoutException
408 Request Timeout
TooManyRequestsException
429 Too Many Requests
UnauthorizedException
401 Unauthorized
UnknownHttpException
An exception for other HTTP status codes that PException does not cover
UnsupportedMediaTypeException
415 Unsupported Media Type