Skip to content

Commit

Permalink
[cb-#99] Merge branch 'master' into cb-#99
Browse files Browse the repository at this point in the history
  • Loading branch information
crookse committed Dec 17, 2019
2 parents 560887b + 6c9a1ad commit 30c88b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
26 changes: 14 additions & 12 deletions README.md
@@ -1,3 +1,4 @@

<p align="center">
<a href="https://crookse.github.io/deno-drash">
<img height="200" src="https://crookse.github.io/deno-drash/public/assets/img/logo_drash_github.png" alt="Drash logo">
Expand Down Expand Up @@ -52,21 +53,22 @@ For full documentation, visit [https://drash.io](https://crookse.github.io/deno-

## Features

- HTTP Resources
- Content Negotiation
- Static Path Routing
- Request Path Params Parsing
- `/users/:id`
- `/users/{id}`
- `/users/([0-9]+)`
- Request URL Query Params Parsing
- `/products?name=beignet&action=purchase`
- Request Body Parsing
- application/x-www-form-urlencoded (e.g., `username=root&password=alpine`)
- application/json (e.g., `{"username":"root","password":"alpine"}`)
- Regex Path Routing (e.g., `/users/([0-9]+)/profile`)
- Middleware
- Before Requests
- After Requests
- Request Params Parsing
- Path Params (e.g., `/users/:id/profile`, `/users/{id}/profile`)
- `request.getPathParam("id") == "value of :id or {id}"`
- URL Query Params (e.g., `/products?name=beignet&action=purchase`)
- `request.getQueryParam("name") == beignet`
- Body Params Using application/x-www-form-urlencoded (e.g., `username=root&password=alpine`)
- `request.getBodyParam("username") == "root"`
- Body Params Using application/json (e.g., `{"username":"root","password":"alpine"}`)
- `request.getBodyParam("password") == "alpine"`
- Header Params (e.g., `{"Some-Header":"Some Value"}`)
- `request.getHeaderParam("Some-Header") == "Some Value"`
- ... or the default way (`request.headers.get("Some-Header") == "Some Value"`)

## Contributing

Expand Down
10 changes: 5 additions & 5 deletions deno_std.ts
@@ -1,22 +1,22 @@
export {
serve,
ServerRequest
} from "https://deno.land/std@v0.24.0/http/server.ts";
} from "https://deno.land/std@v0.25.0/http/server.ts";

export {
STATUS_TEXT,
Status
} from "https://deno.land/std@v0.24.0/http/http_status.ts";
} from "https://deno.land/std@v0.25.0/http/http_status.ts";

export {
walkSync
} from "https://deno.land/std@v0.24.0/fs/mod.ts";
} from "https://deno.land/std@v0.25.0/fs/mod.ts";

export {
runTests,
test
} from "https://deno.land/std@v0.24.0/testing/mod.ts";
} from "https://deno.land/std@v0.25.0/testing/mod.ts";

export {
assertEquals
} from "https://deno.land/std@v0.24.0/testing/asserts.ts";
} from "https://deno.land/std@v0.25.0/testing/asserts.ts";

0 comments on commit 30c88b7

Please sign in to comment.