mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-20 23:30:02 +08:00
List Repos: Print the http req as curl
Makes it easier to test
This commit is contained in:
@ -78,3 +78,12 @@ bool folderWithSpecExists(BuildContext context, String spec) {
|
||||
|
||||
return rootFolder.getFolderWithSpec(spec) != null;
|
||||
}
|
||||
|
||||
String toCurlCommand(String url, Map<String, String> headers) {
|
||||
var headersStr = "";
|
||||
headers.forEach((key, value) {
|
||||
headersStr += ' -H "$key: $value" ';
|
||||
});
|
||||
|
||||
return "curl -X GET '$url' $headersStr";
|
||||
}
|
||||
|
Reference in New Issue
Block a user