Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stratdev3 committed Jan 10, 2024
1 parent 211bef7 commit 92253d8
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# SimpleW

[![NuGet](https://img.shields.io/nuget/v/SimpleW)](https://www.nuget.org/packages/SimpleW)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
<br/>
[![Linux](https://github.com/stratdev3/SimpleW/actions/workflows/build-linux.yml/badge.svg)](https://github.com/stratdev3/SimpleW/actions/workflows/build-linux.yml)
[![MacOS](https://github.com/stratdev3/SimpleW/actions/workflows/build-macos.yml/badge.svg)](https://github.com/stratdev3/SimpleW/actions/workflows/build-macos.yml)
[![Windows (Visual Studio)](https://github.com/stratdev3/SimpleW/actions/workflows/build-windows.yml/badge.svg)](https://github.com/stratdev3/SimpleW/actions/workflows/build-windows.yml)

<img src="src/SimpleW/logo.svg" alt="logo" width="100" />

Expand All @@ -24,7 +29,17 @@ It brings an easy layer on top of the great [NetCoreServer](https://github.com/c
- [Return Type](#return-type)
- [Return Helpers](#return-helpers)
- [Routing](#routing)
- [Examples](#examples)
- [Regexp](#regexp)
- [Query String Parameters](#query-string-parameters)
- [Path Parameters](#path-parameters)
- [Post Body](#post-body)
- [Post Body (application/json) deserialization helper](#post-body-(application/json)-deserialization-helper)
- [Post Body (application/x-www-form-urlencoded) deserialization helper](#post-body-(application/x-www-form-urlencoded)-deserialization-helper)
- [Post Body file (multipart/form-data)](#post-body-file-(multipart/form-data))
- [Serialization](#serialization)
- [JWT Authentication](#jwt-authentication)
- [Websockets](#websockets)
- [OpenTelemetry](#opentelemetry)


Expand Down Expand Up @@ -178,7 +193,6 @@ server.AddStaticContent(

## Serve RestAPI


### Basic RestAPI Example

The RestAPI is based on **routes**, so just add a `RouteAttribute` to target **methods** of a `Controller` base class.<br />
Expand Down Expand Up @@ -410,11 +424,6 @@ Note : all these helpers support differents types of parameters and options to d
most of the use cases. Just browse to discover all the possibilities.


### Edge Cases of Return

Documentation in progress...


### Routing

Each route is a concatenation of :
Expand Down Expand Up @@ -602,7 +611,7 @@ Note : the property `RegExpEnabled` is global to all controllers and must be
set before any `AddDynamicContent()` call.


#### QueryString Parameters
#### Query String Parameters

Query String parameters are also supported in a similar way.
The library will map query string parameter to the method parameter.
Expand All @@ -613,7 +622,7 @@ using System.Net;
using SimpleW;

namespace Sample {

class Program {
static void Main() {
var server = new SimpleWServer(IPAddress.Any, 2015);
Expand Down Expand Up @@ -1003,7 +1012,6 @@ namespace Sample {

### Serialization


#### Default

The return of the `method` will be serialized to json using the excellent `JsonConvert.SerializeObject()` from [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/)
Expand Down Expand Up @@ -1063,12 +1071,12 @@ You can access the `Request` property inside any controller.
You can access the `Response` property inside any controller.


## 3. JWT Authentication
## JWT Authentication

Documentation in progress...


## 4. Websockets
## Websockets

Documentation in progress...

Expand Down

0 comments on commit 92253d8

Please sign in to comment.