laravel - Laravel Telegram bot 错误请求:字符串必须以 UTF-8 编码
问题描述
嗨,我在使用非英语时在 Laravel 电报机器人上遇到错误
Bad Request: strings must be encoded in UTF-8
这是我的代码。也尝试设置标题但没有运气
Route::get('/test',function(){
$bot_token = 'bot1773931989:xxxxx-uUGuaxfI';
$chat_id = '-1001152xxxx';
$message = "binance กำลัง";
$res = Http::post("https://api.telegram.org/$bot_token/sendMessage?chat_id=$chat_id&text=$message");
return $res;
});
感谢提前
解决方案
推荐阅读
- android - 如何使用 DatePickerDialog 仅显示选定的日期
- flutter - 无法在颤动中解析配置“:classpath”的所有工件
- .net - 如何在 IIS 2016 中将多个 SSL 连接到多个站点
- react-hooks - “react-hooks/exhaustive-deps”:eslint-plugin-react-hooks 的“警告”太敏感了?
- java - 如何隐藏和取消隐藏导航项单击的视图?
- java - java.net.ConnectException:连接被拒绝:在 java.net.PlainSocketImpl.socketConnect(本机方法)处连接
- flutter - 颤振:google_mobile_ads 酒吧。如何实现 GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth & GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth?
- c# - C# 静态方法是否同步和锁定?
- visual-studio - 查找 Visual Studio PATH/LIB 文件的问题
- python - 并行处理没有提高效率?