mirror of
https://github.com/httpie/cli.git
synced 2024-11-29 03:03:44 +01:00
Add more types and docs for plugins API II.
This commit is contained in:
parent
e1627803fe
commit
7e0bed4e54
@ -106,9 +106,9 @@ class ConverterPlugin(BasePlugin):
|
|||||||
def __init__(self, mime: str):
|
def __init__(self, mime: str):
|
||||||
self.mime = mime
|
self.mime = mime
|
||||||
|
|
||||||
def convert(self, content_bytes: bytes) -> Tuple[str, Union[str, bytes]]:
|
def convert(self, body: bytes) -> Tuple[str, str]:
|
||||||
"""
|
"""
|
||||||
Convert content as needed and return a tuple containing the new Content-Type and content, e.g.:
|
Convert content bytes to a string and return a tuple containing the new Content-Type and content, e.g.:
|
||||||
('application/json', '{}')
|
('application/json', '{}')
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user