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

Label basic HTTP Components #57

@thejeff77

Description

@thejeff77

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions