简体   繁体   中英

Extension .json for Http Requests

I'm trying to consume and use a third party REST Json based API.

I have done SOAP consumption and wsdl but never REST based on json or XML for that matter.

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. For example:

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.

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?

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. It may be using that to set the accept header on your behalf, but that's just a guess.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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