Skip to content

Instantly share code, notes, and snippets.

@iachievedit
Created August 16, 2014 18:16
Show Gist options
  • Save iachievedit/7556a2c848ffc4fa6e29 to your computer and use it in GitHub Desktop.
Save iachievedit/7556a2c848ffc4fa6e29 to your computer and use it in GitHub Desktop.
Demo
curl -v http://localhost:7335/plain http://localhost:7335/switch http://localhost:7335/plain
* About to connect() to localhost port 7335 (#0)
* Trying 127.0.0.1... connected
> GET /plain HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:7335
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Sat, 16 Aug 2014 18:13:44 GMT
< Content-Length: 11
< Content-Type: text/html
< Server: TwistedWeb/11.1.0
<
PLAINTEXT
* Connection #0 to host localhost left intact
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (127.0.0.1) port 7335 (#0)
> GET /switch HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:7335
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Sat, 16 Aug 2014 18:13:44 GMT
< Content-Length: 10
< Content-Type: text/html
< Server: TwistedWeb/11.1.0
<
SWITCHED
* Connection #0 to host localhost left intact
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (127.0.0.1) port 7335 (#0)
> GET /plain HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:7335
> Accept: */*
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment