This repository was archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Label basic HTTP Components #57
Copy link
Copy link
Open
Description
The logger logs a bunch of output, however it does not label the major portions of the request, leaving it up to guessing from the reader.
Example output:
{"key":"someKey","source":"something","q":"Klon Mofield - A Mo Mo","target":"th"}
iOSApplication[24702:4851073] POST 'https://translation.googleapis.com/language/translate/v2': {
"Accept-Language" = "en-US;q=1";
"Content-Type" = "application/json";
"User-Agent" = "iOSApplication"; }
For instance, taking the output above.
- If you're familiar with HTTP headers, it is obvious that the dictionary at the bottom are the headers. Unfortunately, this is not labeled and is just output as a dictionary preceded by a colon ":", which is not helpful.
- The dictionary in the front - who knows. These could be query parameters, or objects set in the request body, or this could even be the response body. Who knows what its logging! It doesn't tell us what its sending - it just outputs a bunch of dictionaries and leave the reader guessing.
A typical POST call can contain request query params, a request body, request headers, response headers, and a response body. If you're troubleshooting failed API calls, removing all ambiguity by labeling the logs would certainly add a lot of value to this library.
Metadata
Metadata
Assignees
Labels
No labels