接口吐槽

小程序 文章 2020-09-07 16:01 498 0 全屏看文

AI助手支持GPT4.0

接口吐槽Interface Tucao

接口吐槽

忍了很久了, 我要开喷了

拿获取acccess token接口为例:

接口返回json字符串, 但是响应头Content-Type却是"text/plain" ? 谁教你的?

文档说errcode为0时请求成功, 其他接口有的返回了0 , 但是这个接口, 请求成功, 接口直接就没这个字段, 不返回errorcode? , 可去你**的吧!

国内这些接口规范估计就是你们这些大厂带的, 好好的标准规范HTTP状态码不用, 所有接口一律200, 去判断errcode

跟你们对个接口能浪费多少时间, 服!

After a long time, I have to start spraying. Take the access token interface as an example: the interface returns the JSON string, but the response header content type is "text / plain"? Who taught you? When the document says that the request succeeds when the errCode is 0, some other interfaces return 0. However, for this interface, if the request is successful, the interface directly does not have this field and does not return errorcode, You can go to the * * bar! These domestic interface specifications are estimated to be brought by you big manufacturers. Good standard specifications HTTP status code is not used, all interfaces are 200, to judge how much time errCode can waste on an interface with you, service!

回答:

子不语:

所以我自己定义状态码完全按照http标准来,而且必须有errcode,腾讯这个……随缘就好

请学会如何「提问」(👈戳我)【个体工商户】微信认证问题(👈戳我)

迷失的故渊:

王志鹏:

+1

微喵网络:

表示赞同

-EOF-

AI助手支持GPT4.0