Simple Webservice Echo Test

While troubleshooting some PHP Curl issues, I found and used (and later which allows you to create a dummy webservice endpoint which reveals the full request made to it by your code. (Note: both of those services are offline now, see my newer article linked below for a more recent list.)

An even simpler use case would be a webservice that simply returned data about the request directly to the calling application. I just created such a simple echo webservice on my domain.

Update 2012-03-23: Added XML response example as well (

Update 2019-04-30: Updated to reflect services which have gone offline. I’ve also written up a quick recent survey of HTTP inspector services which are still available.

Plain Text Example

$ curl
    [method] => GET
    [headers] => Array
            [User-Agent] => curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3
            [Host] =>
            [Accept] => */*

    [request] => Array
            [foo] => bar

    [client_ip] =>
    [time_utc] => 2012-01-08T21:33:28+0000
    [info] => Echo service from Scooterlabs (

Plain text response with public IP address:

$ curl

JSON Example

$ curl --silent curl | json_xs
   "info" : "Echo service from Scooterlabs (",
   "request" : {
      "foo" : "bar"
   "headers" : {
      "User-Agent" : "curl/7.21.3 (i386-portbld-freebsd7.3) libcurl/7.21.3 OpenSSL/1.0.0e zlib/1.2.3 libidn/1.22",
      "Accept" : "*/*",
      "Host" : ""
   "client_ip" : "",
   "time_utc" : "2012-01-08T22:07:54+0000",
   "method" : "GET"

XML Example

$ curl --silent | xml_pp

<?xml version="1.0"?>
    <User-Agent>curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3</User-Agent>
  <info>Echo service from Scooterlabs (</info>


Source code is up on Github: If anyone has any comments or feedback, let me know here or on Github.