[英]RESTful services and
I have just read Resource-Oriented Architecture: The Rest of REST . 我刚刚阅读了面向资源的体系结构:REST的其余部分 。 The reasoning behind content negotiation is compelling, but there's one thing I sometimes need, which seems to be impossible in this schema.
内容协商背后的理由令人信服,但是我有时需要做一件事,在这种模式下这似乎是不可能的。
Let assume I've got a web service to deliver some graphs. 假设我有一个Web服务来提供一些图形。 I want users to choose between different styles of these graphs (a fancy color one, B&W, ...), but all of them are always png images.
我希望用户在这些图形的不同样式之间进行选择(精美的颜色,黑白,...),但所有图形始终都是png图像。 For all of them the mimetype will simply be image/png.
对于所有这些人,mimetype将仅为image / png。 So what is the preferred way to negotiate custom parameters?
那么协商自定义参数的首选方法是什么?
使用querystring参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.