MCPcopy
hub / github.com/httpie/cli / decode_raw_args

Function decode_raw_args

httpie/core.py:285–298  ·  view source on GitHub ↗

Convert all bytes args to str by decoding them using stdin encoding.

(
    args: List[Union[str, bytes]],
    stdin_encoding: str
)

Source from the content-addressed store, hash-verified

283
284
285def decode_raw_args(
286 args: List[Union[str, bytes]],
287 stdin_encoding: str
288) -> List[str]:
289 """
290 Convert all bytes args to str
291 by decoding them using stdin encoding.
292
293 """
294 return [
295 arg.decode(stdin_encoding)
296 if type(arg) is bytes else arg
297 for arg in args
298 ]

Callers 1

raw_mainFunction · 0.85

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected