Skip to content

Commit

Permalink
chore: bump version to 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hpopp committed Aug 30, 2024
1 parent 5c2317d commit c3c0f99
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
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**
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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} ->
Expand All @@ -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
}
Expand All @@ -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"
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion lib/kadabra.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule Kadabra do
end
%Kadabra.Stream.Response{
body: "<html>\\n<body>\\n<h1>Go + HTTP/2</h1>\\n\\n<p>Welcome to..."
body: "GET OK"
headers: [
{":status", "200"},
{"content-type", "text/html; charset=utf-8"},
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
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
[
Expand Down

0 comments on commit c3c0f99

Please sign in to comment.