Is there a way to copy the HTTP request as a curl command (colloquially, "copy as curl") or to replay it from the network dev tools for Flutter?
CodePudding user response:
The latest devtools versions should have the copy-as-curl
functionality. See the PR here.
See also the feature request issue that the above PR closed: feature request: copy http request "as curl" #3042
According to the CHANGELOG the feature was released in version 2.14.0, so in theory you just have to upgrade to that or any later version, and you'll have Copy as URL and Copy cURL.
CodePudding user response:
As far as I know, you cannot copy a request as curl in dev tools. If you use Dio, you can intercept the Dio request with this package and get an HTTPS request as a curl string printed in the console. Then you can use Postman to replay it.