Skip to content

Commit

Permalink
apis
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Aug 8, 2020
1 parent 5791c40 commit 4d445de
Show file tree
Hide file tree
Showing 73 changed files with 385 additions and 318 deletions.
15 changes: 14 additions & 1 deletion docs/context.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Context

Context object
Context is initialized when a new request enters.

## Context utils

- getPostParams: gets the parameters by HttpPost.
- getQueryParams: gets the query strings(for example, "www.google.com/hello?name=12", `name=12`).
- getPathParams: gets the route parameters(for example, "/hello/{name}").

- setResponse: it is handy to make the response of `ctx`.
- attachment: `attachment` is used to specify the file will be downloaded.
- staticFileResponse: serves static files.

- getUploadFile: gets the `UploadFile` from request.
- save: saves the `UploadFile` to disk.
2 changes: 1 addition & 1 deletion docs/coreapi/prologue.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h1><a class="toc-backref" href="#19">Exports</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:14 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:26 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/application.html
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ <h1><a class="toc-backref" href="#19">Exports</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:13 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:25 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/basicregex.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h1 class="title">prologue/core/basicregex</h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:00 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:10 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ <h1><a class="toc-backref" href="#19">Exports</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:35:59 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:09 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h1><a class="toc-backref" href="#10">Consts</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:35:54 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:05 UTC</small>
</div>
</div>
</div>
Expand Down
68 changes: 34 additions & 34 deletions docs/coreapi/prologue/core/context.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/encode.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:01 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:12 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:02 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:13 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/httpexception.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:35:59 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:09 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/middlewaresbase.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:02 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:13 UTC</small>
</div>
</div>
</div>
Expand Down
108 changes: 54 additions & 54 deletions docs/coreapi/prologue/core/naive/request.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/naive/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:02 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:13 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/nativesettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:01 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:12 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h1><a class="toc-backref" href="#13">Funcs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:35:54 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:05 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/prologue/core/request.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h1><a class="toc-backref" href="#19">Exports</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 11:36:02 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-08-08 12:48:12 UTC</small>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 4d445de

Please sign in to comment.