How to print out the request string?
jhseung opened this issue · 1 comments
jhseung commented
I'm trying to debug my app, and I need access to the url of the apirequest.
request.path isn't working
DenTelezhkin commented
You can print out complete cURL of the Alamofire.Request by using debugPrint:
let alamofireRequest = request.perform(withSuccess: { _ in }, failure: { _ in })
debugPrint(alamofireRequest)
or alternatively, you can use NetworkLoggerPlugin, which does the same thing:
https://github.com/MLSDev/TRON/blob/master/Source/NetworkLoggerPlugin.swift