method property Null safety

String method
final

Represents the request method. ex: GET, POST, PUT, DELETE, PATCH, HEAD.

Post Example:

 Future<RequestEntity> postTest(entity) async {
 try {
   final response = await uno.post('https://jsonplaceholder.typicode.com/posts/?title=${entity.title}&body=${entity.body}');
   if (response.status == 201) {
     
     return RequestEntity(title: 'title', body: 'body', status: response.status);
   } else {
     throw Exception();
   }
 } catch (e) {
   throw Exception(e);
 }
}

Implementation

final String method;