A custom URLSession for logging network activity into the console.
URLSession.logged(.basic)There are two available output levels: basic and detailed.
Basic
π GET https://users-endpoint.com/user
β
200 https://users-endpoint.com/user
Detailed
π POST https://users-endpoint.com/user
"Content-Type" : "application/json"
{
"foo" : "Foo",
"bar" : "Bar"
}
β
200 https://users-endpoint.com/user
{
"id" : 25918204,
"name" : "John Doe"
}
βοΈ -999 https://users-endpoint.com/user
timeout