How to make basic REST API calls using a browser

I am trying to get started with REST API calls by seeing how to format API calls using a browser. Most of the examples I found on the Internet use the SDK or simply return all the fields for the request.

For example, I'm trying to use the Soundcloud API to view track information .

To start, I made a simple request in the browser as follows http://api.soundcloud.com/tracks/13158665.json?client_id=31a9f4a3314c219bd5c79393a8a569ec, which returns a bunch of track information in JSON format

(e.g. {"kind":"track","id":13158665,"created_at":"2011/04/06 15:37:43 ...})

Is it only possible to return the value of "created_at" using a browser? I apologize if this is a basic question, but I don’t know what keywords to search on the Internet. Links to basic guides would be nice, although I would prefer not to use a specific SDK at the moment.

+4
source share
3 answers

In fact, it is really difficult to answer such a question, since it depends on the web API. I mean, if the API only supports returning a subset of fields, you can, but if not, you will get all the content. From what I saw in the documentation, this is not possible. Filters allow you to get a subset of elements and not control the list of returned fields inside elements.

, HTTP- ( REST) ​​ Chrome: . HTTP-, GET, , , .

Firefox, Firebug .

, , , -: https://templth.wordpress.com/2014/12/15/designing-a-web-api/.

, , , Thierry

+6

DHC , put get

+4

REST, GET. , , URI, HTTP GET JSON.

JSON - , REST. , GET, , . JSON, HTML-. , JSON, , JSON. , JSON, JavaScript.

You can use REST clients (for example, Advanced REST Client for Chrome ) to create HTTP POST and PUT if a particular REST endpoint has built-in functions for receiving data and doing something with it. For example, many wiki-style REST endpoints allow you to create a page with custom-made HTTP POST with specific header information, URI, or JSON parameters as part of this.

+2
source

All Articles