简体   繁体   English

Http请求扩展名.json

[英]Extension .json for Http Requests

I'm trying to consume and use a third party REST Json based API. 我正在尝试使用和使用基于第三方REST Json的API。

I have done SOAP consumption and wsdl but never REST based on json or XML for that matter. 我已经完成了SOAP消耗和wsdl的工作,但是从没有基于json或XML的REST。

Anyway I'm trying to understand in some documentation what this .json extension is in examples of the api request urls they are showing me. 无论如何,我试图在一些文档中了解它们向我显示的api请求网址示例中的.json扩展名是什么。 For example: 例如:

http://someuri/api/version/ customer.json http:// someuri / api / version / customer.json

what is that? 那是什么? I'm going to be sending HttpWebRequest requests via .NET but then I also wonder what this .json extension has to do with me sending requests over. 我将通过.NET发送HttpWebRequest请求,但随后我也想知道此.json扩展名与我发送请求有关。

Also should I be sending request params in the Header or via querystring when trying to consume a REST json based 3rd party API from .NET? 当尝试从.NET使用基于REST json的第三方API时,我还应该在标头中或通过querystring发送请求参数?

We cannot answer your questions without being able to see the documentation. 如果无法查看文档,我们将无法回答您的问题。 Your questions about Headers/Query string should be in the documentation of the service. 您对标题/查询字符串的疑问应在服务文档中。

The extension .json is specific to the service. 扩展名.json特定于服务。 It may be using that to set the accept header on your behalf, but that's just a guess. 可能使用它来代表您设置accept标头,但这只是一个猜测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM