Build a FormData object based on the given a Method
This allows you to have autocomplete and type-checking
when using the client.request function,
while still being able to upload files to the Telegram API.
The rules work as follows:
string parameters will be appended to the FormData using their name.
File parameters will be appended with their name and filename (new File(...).name)
Other parameters will be JSON.stringifyed and appended with their name.
Build a FormData object based on the given a Method
This allows you to have autocomplete and type-checking when using the
client.request
function, while still being able to upload files to the Telegram API.The rules work as follows:
string
parameters will be appended to the FormData using their name.File
parameters will be appended with their name and filename (new File(...).name
)JSON.stringify
ed and appended with their name.