jsdelivr/globalping-cli

Improve HTTP output

MartinKolarik opened this issue · 8 comments

Instead of rawOutput, print rawHeaders to stderr and rawBody to stdout (see jsdelivr/globalping#347 for explanation).

jimaek commented

By default we use head anyway so nothing will change in the output there, right? What do we show if the user specifies GET? Show headers and html?
What the user needs to do to only get html?

For HEAD, nothing changes. For GET, you get the headers + body now. We could add an option to remove headers from the output, but I don't think it's necessary when it goes to the error stream.

didil commented

@MartinKolarik does this only need to be implemented for ci mode ? or also for the live mode ?

didil commented

also where do we write the result headers (example > EU, DE, Frankfurt, ASN:16276, OVH SAS)). To stderr or stdout ?

@MartinKolarik does this only need to be implemented for ci mode ? or also for the live mode ?

Always.

also where do we write the result headers (example > EU, DE, Frankfurt, ASN:16276, OVH SAS)). To stderr or stdout ?

err, I already opened a separate task for that as it applies to all commands #56

didil commented

@jimaek do these changes --full and rawBody vs rawOutput need to be implemented in the chatbot as well ?

jimaek commented

The output doesnt change right? We agreed that by default we use HEAD and show only headers, and get shows only HTML without headers.
So it wouldn't hurt to add --full to match the CLI.

@MartinKolarik confirm please

@didil yes make chatbots match the CLI.