Comments (5)
在headers中加了charset=utf8
应该不会乱码了
(之前忘记了
from gomirai.
应该改成
res, err := c.HttpClient.Request().
Path(path).
Method("POST").
Use(body.JSON(data)).
SetHeader("Content-Type", "application/json;charset=utf-8").
Send()
那个body.Json里面没有设置编码
from gomirai.
已经更新了,感谢
from gomirai.
现在还是不行,应该先Use(body.JSON(data))
再SetHeader("Content-Type", "application/json; charset=UTF-8")
,不然Use的时候会自动覆盖掉原来的Header。
from gomirai.
现在还是不行,应该先
Use(body.JSON(data))
再SetHeader("Content-Type", "application/json; charset=UTF-8")
,不然Use的时候会自动覆盖掉原来的Header。
谢谢提醒
(因为我这边默认编码没问题所以没做过测试,添麻烦了,thanks
from gomirai.
Related Issues (11)
- http-api返回格式有所改动。FetchMessage会报错cannot unmarshal object into Go value of type []gomirai.InEvent HOT 2
- InEvent.SenderDetail() : sender 序列化失败
- SendImageMessage方法调用的http接口有问题 HOT 2
- 发送本地图片时希望改为先uploadImage再通过imageId发送,或者提供一个uploadImage的接口 HOT 2
- 回复中文的时候乱码 HOT 9
- 如何得到进群成员的信息呢? HOT 2
- 按照例子写的代码无法运行 HOT 4
- 这个机器人怎么用啊,主页的哪个 e 什么的链接点进去了啥都看不懂,还有急速入门里面也全是英文,点了那个围棋之旅也进不去,有没有中文的文章 HOT 7
- 求助 HOT 1
- 请问:c := bot.NewClient("default", "http://124.70.68.221:8001", "12345678") HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gomirai.