dio2curl

Creator: coderz1093

Last updated:

0 purchases

dio2curl Image
dio2curl Images

Languages

Categories

Add to Cart

Description:

dio2curl

dio2curl - #
Converts dio requests to curl format
Usage #
import 'dart:convert';
import 'package:dio2curl/dio2curl.dart';
import 'package:dio/dio.dart';

void main() async{
var dio = Dio();

final data = {
"title": "voluptate et itaque vero tempora molestiae",
"body": "eveniet quo quis laborum totam consequatur non dolor ut et est repudiandae est voluptatem vel debitis et magnam"
};


dio.post(
"https://jsonplaceholder.typicode.com/posts",
data: json.encode(data),
options: Options(
responseType: ResponseType.json,
headers: {
'Authorization': 'Bearer asdkfjalskdfjSomebullshit',
},

)).then((response) {
print(dio2curl(response.request));
});


}
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.