6

发现客户端同学和前端的对于接口风格的偏好还是有些不一致的

 2 years ago
source link: https://www.v2ex.com/t/822769
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

发现客户端同学和前端的对于接口风格的偏好还是有些不一致的

  zoharSoul · 15 分钟前 · 105 次点击

比如 users/{user}/repos 这样的 path param, 对于 android 来说, 因为 retrofit 支持, 写起了体验很好, 所以 android 同事还是很喜欢的. 但是前端同事一般都比较抵触.

再比如只有一两个参数的 post 请求, 用 application/x-www-form-urlencoded ,客户端同事一般没啥意见. 但是前端一般会问能不能用 application/json 的.

还是挺有意思的. 哈哈


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK