I'm using Moya and need to print the cURL for a network request.
Usually, in Alamofire 4, I would do something like this:
let req = Alamofire.request(someURLRequestConvertible)
debugPrint(req) // will print cURL
My call site for Moya looks like this:
MyMoyaProvider.request(MyEndPoints.login(params)) { (result) in }
I've checked out the documentation for Moya, but I can't seem to get the results I'm looking for. I enabled the NetworkLoggingPlugin
but still unsure how to print cURL
for certain requests. Can someone help me find the proper way to print the Moya request
's cURL
to console?