Runscope Documentation

Code Examples

The Traffic Inspector works with any HTTP client library in any language or framework by using a Gateway URL in your code. Here are some examples using popular HTTP clients with Gateway URLs in your code.

Languages and Frameworks

  • Android (HttpClient, HttpURLConnection, OkHttp)
  • C# / .NET (HttpClient, HttpWebRequest, RestSharp)
  • Go (net/http)
  • Java (Apache HttpClient)
  • JavaScript (Node.js, Request, jQuery, Restangular)
  • Objective-C / iOS (NSURLConnection, AFNetworking, RestKit, ASIHTTPRequest)
  • PHP (curl, Guzzle, Requests for PHP, Zend_Rest_Client, Zend HTTP Client)
  • Python (Requests, urllib2)
  • Ruby (HTTParty, Net::HTTP, Typheous, Faraday)


API-specific SDKs and Client Libraries

Helper Libraries

Because Runscope only requires you to update the URL, using a library isn't strictly necessary. But it can be convenient. Here are some official and community-contributed libraries that make creating Gateway URLs a breeze.



requests-runscope: automatically send your Requests for Python requests through Runscope with this Transport Adapter.

Community Code

iOS / Objective-C

Runscope-iOS (Hung Truong): A subclass of NSMutableURLRequest that automagically changes your API requests to Runscope requests.


runscope-rb (Chris Warren): Ruby gem to automatically create Gateway URLs for requests using Net::HTTP.


RunscopeMessageHandler (Darrel Miller): Runscope Message Handler for use with System.Net.Http.HttpClient