You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request, since this project is inspired from Chuck the one feature which I sorely miss is the capability to share a curl, since constructing a curl is fairly easy in Chuck the curl generation code should look like
var compressed = false
var curlCmd = "curl"
curlCmd += " -X " + v(transaction?.method)
val headers = transaction?.requestHeaders ?: emptyList()
var i = 0
val count = headers.size
while (i < count) {
val name = headers[i].name
val value = headers[i].value
if ("Accept-Encoding".equals(name, ignoreCase = true) && "gzip".equals(value, ignoreCase = true)) {
compressed = true
}
curlCmd += " -H \'$name: $value\'"
i++
}
val requestBody = v(transaction?.requestBody)
if (requestBody.isNotEmpty()) {
// try to keep to a single line and use a subshell to preserve any line breaks
curlCmd += " --data $'" + requestBody.replace("\n", "\\n") + "'"
}
curlCmd += (if (compressed) " --compressed " else " ") + "\'${v(transaction?.url)}\'"
The text was updated successfully, but these errors were encountered:
This is a feature request, since this project is inspired from Chuck the one feature which I sorely miss is the capability to share a curl, since constructing a curl is fairly easy in Chuck the curl generation code should look like
The text was updated successfully, but these errors were encountered: