-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: correctly encode request data as JSON body
The request data was actually serialized as multipart/form-data instead of a JSON body. Passing JSON data with a boolean value then throw an error while serializing: bot.sendMessage({ chat_id: user.id, text: text, disable_web_page_preview: false, // throws an error }); // > TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer. Received type boolean
- Loading branch information
Showing
1 changed file
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters