-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# Changelog | ||
|
||
## v0.6.1 | ||
|
||
**Fixed** | ||
|
||
- Removed Elixir compile warnings. | ||
|
||
## v0.6.0 | ||
|
||
**Security** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,15 +18,15 @@ Add kadabra to your `mix.exs`: | |
```elixir | ||
def deps do | ||
[ | ||
{:kadabra, "~> 0.6.0"} | ||
{:kadabra, "~> 0.6.1"} | ||
] | ||
end | ||
``` | ||
|
||
## Usage | ||
|
||
```elixir | ||
{:ok, pid} = Kadabra.open("https://http2.golang.org") | ||
{:ok, pid} = Kadabra.open("https://http2.codedge.dev") | ||
Kadabra.get(pid, "/") | ||
receive do | ||
{:end_stream, %Kadabra.Stream.Response{} = stream} -> | ||
|
@@ -36,8 +36,13 @@ after 5_000 -> | |
end | ||
|
||
%Kadabra.Stream.Response{ | ||
body: "<html>\n<body>\n<h1>Go + HTTP/2</h1>\n\n<p>Welcome to <a href=\"https://golang.org/\">the Go language</a>'s <a\nhref=\"https://http2.github.io/\">HTTP/2</a> demo & interop server.</p>\n\n<p>Congratulations, <b>you're using HTTP/2 right now</b>.</p>\n\n<p>This server exists for others in the HTTP/2 community to test their HTTP/2 client implementations and point out flaws in our server.</p>\n\n<p>\nThe code is at <a href=\"https://golang.org/x/net/http2\">golang.org/x/net/http2</a> and\nis used transparently by the Go standard library from Go 1.6 and later.\n</p>\n\n<p>Contact info: <i>[email protected]</i>, or <a\nhref=\"https://golang.org/s/http2bug\">file a bug</a>.</p>\n\n<h2>Handlers for testing</h2>\n<ul>\n <li>GET <a href=\"/reqinfo\">/reqinfo</a> to dump the request + headers received</li>\n <li>GET <a href=\"/clockstream\">/clockstream</a> streams the current time every second</li>\n <li>GET <a href=\"/gophertiles\">/gophertiles</a> to see a page with a bunch of images</li>\n <li>GET <a href=\"/file/gopher.png\">/file/gopher.png</a> for a small file (does If-Modified-Since, Content-Range, etc)</li>\n <li>GET <a href=\"/file/go.src.tar.gz\">/file/go.src.tar.gz</a> for a larger file (~10 MB)</li>\n <li>GET <a href=\"/redirect\">/redirect</a>to redirect back to / (this page)</li>\n <li>GET <a href=\"/goroutines\">/goroutines</a> to see all active goroutines in this server</li>\n <li>GET <a href=\"/.well-known/h2interop/state\">/.well-known/h2interop/state</a> for the HTTP/2 server state</li>\n <li>PUT something to <a href=\"/crc32\">/crc32</a> to get a count of number of bytes and its CRC-32</li>\n <li>PUT something to <a href=\"/ECHO\">/ECHO</a> and it will be streamed back to you capitalized</li>\n</ul>\n\n</body></html>", | ||
headers: [{":status", "200"}, {"content-type", "text/html; charset=utf-8"}, {"content-length", "1708"}, {"date", "Sun, 16 Oct 2016 21:20:47 GMT"}], | ||
body: "<html>\\n<body>\\n<h1>Go + HTTP/2</h1>\\n\\n<p>Welcome to..." | ||
headers: [ | ||
{":status", "200"}, | ||
{"content-type", "text/html; charset=utf-8"}, | ||
{"content-length", "1708"}, | ||
{"date", "Sun, 16 Oct 2016 21:20:47 GMT"} | ||
], | ||
id: 1, | ||
status: 200 | ||
} | ||
|
@@ -46,7 +51,7 @@ end | |
## Making Requests Manually | ||
|
||
```elixir | ||
{:ok, pid} = Kadabra.open("https://http2.golang.org") | ||
{:ok, pid} = Kadabra.open("https://http2.codedge.dev") | ||
|
||
path = "/ECHO" # Route echoes PUT body in uppercase | ||
body = "sample echo request" | ||
|
@@ -66,7 +71,11 @@ end | |
|
||
%Kadabra.Stream.Response{ | ||
body: "SAMPLE ECHO REQUEST", | ||
headers: [{":status", "200"}, {"content-type", "text/plain; charset=utf-8"}, {"date", "Sun, 16 Oct 2016 21:28:15 GMT"}], | ||
headers: [ | ||
{":status", "200"}, | ||
{"content-type", "text/plain; charset=utf-8"}, | ||
{"date", "Sun, 16 Oct 2016 21:28:15 GMT"} | ||
], | ||
id: 1, | ||
status: 200 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
defmodule Kadabra.Mixfile do | ||
use Mix.Project | ||
|
||
@version "0.6.0" | ||
@version "0.6.1" | ||
|
||
def project do | ||
[ | ||
|