Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Label basic HTTP Components #57

Open
thejeff77 opened this issue Dec 15, 2018 · 0 comments
Open

Label basic HTTP Components #57

thejeff77 opened this issue Dec 15, 2018 · 0 comments

Comments

@thejeff77
Copy link

thejeff77 commented Dec 15, 2018

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.

  1. 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.
  2. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant