arna_response_validation

Last updated:

0 purchases

arna_response_validation Image
arna_response_validation Images
Add to Cart

Description:

arna response validation

Introduction #
A simple and powerful HTTP validator for Flutter.
Getting Started #
Add Arna Response Validation as a dependency in your pubspec.yaml:
dependencies:
arna_response_validation: ^1.3.0
copied to clipboard
Import it:
import 'package:arna_response_validation/arna_response_validation.dart';
copied to clipboard
Use it!
final Response? response = await webService.get(
Uri.parse('https://api.ipify.org'),
);
final body = validateResponse(response);
arnaLogger(title: 'Your IP', data: body);

dynamic validateResponse(final Response? response) {
final StatusCode? statuscode = ArnaResponseValidation().getStatusCode(response);
if (statuscode != null) {
arnaLogger(title: 'StatusCode', data: statuscode);
return ArnaResponseValidation().getBody(response);
}
return null;
}

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.