Skip to content

Commit df34163

Browse files
committed
updating readme
1 parent a683137 commit df34163

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# .NET nanoFramework WebServer
22

3-
This is a simple nanoFrmaework WebServer. Features:
3+
This is a simple nanoFramework WebServer. Features:
44

55
- Handle multithread requests
66
- Serve static files on any storage
@@ -19,7 +19,7 @@ Limitations:
1919

2020
## Usage
2121

22-
You just need to specify a port and a timeout for the querries and add an event handler when a request is incoming. With this first way, you will have an event raised every time you'll receive a request.
22+
You just need to specify a port and a timeout for the queries and add an event handler when a request is incoming. With this first way, you will have an event raised every time you'll receive a request.
2323

2424
```csharp
2525
using (WebServer server = new WebServer(80, HttpProtocol.Http)
@@ -46,7 +46,7 @@ using (WebServer server = new WebServer(80, HttpProtocol.Http, new Type[] { type
4646
}
4747
```
4848

49-
In this case, you're passing 2 classes where you have public methods decorated which will be called everytime the route is found.
49+
In this case, you're passing 2 classes where you have public methods decorated which will be called every time the route is found.
5050

5151
With the previous example, a very simple and straight forward Test controller will look like that:
5252

@@ -71,15 +71,15 @@ public class ControllerTest
7171
}
7272
```
7373

74-
In this example, the `RoutePostTest` will be called everytime the called url will be `test` or `Test2` or `tEst42` or `TEST`, the url can be with parameters and the method GET. Be aware that `Test` won't call the function, neither `test/`.
74+
In this example, the `RoutePostTest` will be called every time the called url will be `test` or `Test2` or `tEst42` or `TEST`, the url can be with parameters and the method GET. Be aware that `Test` won't call the function, neither `test/`.
7575

7676
The `RouteAnyTest`is called whenever the url is `test/any` whatever the method is.
7777

7878
There is a more advance example with simple REST API to get a list of Person and add a Person. Check it in the [sample](./WebServer.Sample/ControllerPerson.cs).
7979

8080
**Important**
8181
* By default the routes are not case sensitive and the attribute **must** be lowercase
82-
* If you want to use case sensite routes like in the previous example, use the attribute `CaseSensitive`. As in the previous example, you **must** write the route as you want it to be restonded too
82+
* If you want to use case sensitive routes like in the previous example, use the attribute `CaseSensitive`. As in the previous example, you **must** write the route as you want it to be responded to.
8383

8484
## A simple GPIO controller REST API
8585

@@ -169,16 +169,16 @@ With the previous example the following happens:
169169

170170
- All the controller by default, even when nothing is specified will use the controller credentials. In our case, the Basic authentication with the default user (topuser) and password (topPassword) will be used.
171171
- When calling http://yoururl/authbasic from a browser, you will be prompted for the user and password, use the default one topuser and topPassword to get access
172-
- When calling http://yoururl/authnone, you won't be prompted because the authentication has been overrided for no authentication
172+
- When calling http://yoururl/authnone, you won't be prompted because the authentication has been overridden for no authentication
173173
- When calling http://yoururl/authbasicspecial, the user and password are different from the defautl ones, user2 and password is the right couple here
174-
- If you would have define in the controller a speicif user and password like `[Authentication("Basic:myuser mypassword")]`, then the default one for all the controller would have been myuser and mypassword
175-
- When calling http://yoururl/authapi, you must pass the header `ApiKey` (case sensitive) with the value `superKey1234` to get authorized, this is overriden the default Basic authentication
176-
- When calling http://yoururl/authdefaultapi, the defautl key `ATopSecretAPIKey1234` will be used so you have to pass it in the headers of the request
174+
- If you would have define in the controller a specific user and password like `[Authentication("Basic:myuser mypassword")]`, then the default one for all the controller would have been myuser and mypassword
175+
- When calling http://yoururl/authapi, you must pass the header `ApiKey` (case sensitive) with the value `superKey1234` to get authorized, this is overridden the default Basic authentication
176+
- When calling http://yoururl/authdefaultapi, the default key `ATopSecretAPIKey1234` will be used so you have to pass it in the headers of the request
177177

178178
All up, this is an example to show how to use authentication, it's been defined to allow flexibility.
179179

180180

181-
## Managing incoming querries thru events
181+
## Managing incoming queries thru events
182182

183183
Very basic usage is the following:
184184

0 commit comments

Comments
 (0)