Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izuzak/urlecho
HTTP service for echoing the HTTP response defined in the URL of the request
https://github.com/izuzak/urlecho
Last synced: about 2 months ago
JSON representation
HTTP service for echoing the HTTP response defined in the URL of the request
- Host: GitHub
- URL: https://github.com/izuzak/urlecho
- Owner: izuzak
- License: other
- Created: 2010-11-03T18:40:01.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2020-03-25T11:34:48.000Z (over 4 years ago)
- Last Synced: 2023-03-11T07:47:36.918Z (almost 2 years ago)
- Language: Python
- Homepage: http://izuzak.github.com/urlecho
- Size: 65.4 KB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Overview
--------URL Echo is an HTTP service for echoing the HTTP response defined in the URL of the request.
The service expects a definition of a HTTP response message in the URL of a request to the service. The service responds with a HTTP response by mirroring the parameters defined in the URL of the request thus echoing the client-defined response.
The URL Echo service is implemented and provided as public, open-source and free to use [AppEngine](http://code.google.com/appengine/) service.
Service API
-----------The service is available at this URL: `http://urlecho.appspot.com/echo`.
The API defines how a HTTP response should be encoded in the service request URLs. Elements of a HTTP response are encoded as URL query parameters:
* (optional) HTTP status - `status` parameter; a number representing the HTTP status code of the HTTP response (e.g. `status=200`). Default value: `200`.
* (optional, multiple) HTTP headers - multiple query parameters specified as `headerName=headerValue` (e.g. `Content-Type=text/plain`). Default values: `Content-Type=text/plain`
* (optional) HTTP body - `body` parameter; a string representing the body of the HTTP response (e.g. `body=HelloWorld`).
* (optional) debug mode - `debugMode` parameter; specifies debug mode in which the response is sent as the body in text/plain (e.g. `debugMode=1`)Example
-------Here's an example URL Echo request that defines a HTTP response containing an ATOM feed in the response body:
http://urlecho.appspot.com/echo?status=200&body=%20%20Example%20Feed%20A%20subtitle.%20%20%20urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6%202003-12-13T18:30:02Z%20%20John%20Doe%[email protected]%20%20%20Atom-Powered%20Robots%20Run%20Amok%20%20urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a%202003-12-13T18:30:02Z%20Some%20text.%20%20&Content-Type=application/atom+xml
And here's the URL Echo HTTP response for the above ATOM feed GET example:
HTTP/1.1 200 OK
Content-Type: application/atom+xml
<...other-headers...>
Example Feed
A subtitle.
urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6
2003-12-13T18:30:02Z
John Doe
[email protected]
Atom-Powered Robots Run Amok
urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a
2003-12-13T18:30:02Z
Some text.
URL builder
-----------A simple URL builder for URL Echo is available at: [http://izuzak.github.com/urlecho](http://izuzak.github.com/urlecho).
Purpose
-------URL echo enables dynamic hosting of HTTP resources within a URL without need for any physical infrastructure (e.g. web servers). The reason for hosting a resource within a URL are links, the glue of the Web. A link functions as a pointer to a web resource - it is a single entity which defines both which resource should be fetched (a URL identifier of the resource) and how the resource should be fetched (HTTP GET request to that URL). Therefore, defining a resource in the URL of a HTTP request makes it widely usable in the existing web architecture by both developers and end-users.
Want to show a web page to someone? With URL echo you wouldn't need to setup a web hosting account with a provider, upload your files to a web host and then share the URL to the web page with your friends. Instead, you would build your web page, encode it's content in a URL, and share the URL with your friends skipping the whole step of hosting. Need a fast way to dynamically create a large number of HTTP resources, for testing or other purposes? Just create the URLs containing the resources on the client side, no need for creating server-side scripts.
Since the resource are defined and contained solely within the URL, URL echo may only be used to host static HTTP resources. However, a significant percentage of all web resources are static resources and in many occasions that's enough. Also, since creating a resource is as easy as constructing a URL, this limitation is irrelevant in use cases where the resource creator has control over all links that point to that URL - a resource is changed by pointing a link at a different URL can easily change the URL of the link to change the resource.
Advanced
--------### URL shortening ###
URL Echo URLs are long and ugly since they contain a complete web resource definition (e.g. a web page). Although the URLs are completely functional, sometimes it is more practical to have a shorter version. This is a perfect use case for URL shortening services like [bit.ly](http://bit.ly). URL shortening services produce short URLs from long ones and sending a HTTP request to short URL redirects the request to the long URL.
For example, this is the short bit.ly version of the ATOM feed URL echo example URL: [http://bit.ly/bV0So](http://bit.ly/bV0So).
Credits
-------URL Echo is developed by [Ivan Zuzak](http://ivanzuzak.info) <[email protected]>.
License
-------Licensed under the [Apache 2.0 License](https://github.com/izuzak/urlecho/blob/master/LICENSE).
[![gaugestracking alpha](https://secure.gaug.es/track.gif?h[site_id]=5162c24ff5a1f52219000094&h[resource]=http%3A%2F%2Fgithub.com%2Fizuzak%2Furlecho&h[title]=urlecho%20%28GitHub%29&h[unique]=1&h[unique_hour]=1&h[unique_day]=1&h[unique_month]=1&h[unique_year]=1 "ivanzuzak.info")](http://ivanzuzak.info/)