0 purchases
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.