Using the web inspector

See how Silk is using its own API.

Site
Page
User
Taglist 
Query 
FAQ

See how Silk uses its own API

As stated in the introduction, this documentation of the Silk API does not cover the full 100% of the requests and responses of the API. We tried to cover the most important parts of it, but as a developer, you may have special cases not described here.

Luckily, all calls that Silk makes to its own API can be seen using the web inspector / web console / Firebug in modern browsers. These HTTP calls can be seen because Silk mainly runs Javascript in combination with the API, and so all Javascript XHR calls are visible.

Webkit (Chrome and Safari)

In Chrome and Safari, the web inspector is built in. Open it by hitting Ctrl-Alt-i on Windows/Linux or command-option-i on a Mac to see the web inspector panel. Navigate to the Network tab and then to XHR (at the bottom) to see only XHR requests that are made. If you now perform certain actions on Silk, for example do a query, you will see exactly what calls are made to the API. Every request is shown on a line, clicking it will reveal the details about this call (method, cookies, url, response, etc).



The web inspector on Chrome

Firefox

In Firefox, bring up the web console with command+option+k on a Mac or control+shift+k on Windows/Linux. Now, only select the tab/button Net. Now you can go to Silk and perform certain actions, for example do a query. You will see exactly what calls are made to the API. Every request is shown on a line, clicking it will reveal the details about this call (method, cookies, url, response, etc). 



The web console on Firefox

You can also use Firebug for this which gives you a bit more control over the http requests that are made. Open up Firebug and click the tab Net and the button XHR to only see the calls that javascript on the page makes.

Internet Explorer

In Internet Explorer, hit F12 to open up developer tools. Go to the Network tab and navigate through Silk to see the http requests that are made. Make sure you click the button Start Capturing to see the request. To see only the XHR requests (the requests from Javascript to the API) you can sort the request by initiator and look for JS Library XMLHttpRequest.



The developer tools on Internet Explorer


Questions? Feedback? Go to our developer forum