You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,18 +80,18 @@ If it started ok, point your browser at <http://localhost:8080/> and enjoy a web
80
80
81
81
### Nanolets
82
82
83
-
Nanolets are like sevlet's only that they have a extremely low profile. They offer an easy to use system for a more complex server application.
84
-
This text has to be extrended with an example, so for now take a look at the unit tests for the usage. <https://github.com/NanoHttpd/nanohttpd/blob/master/nanolets/src/test/java/fi/iki/elonen/router/AppNanolets.java>
83
+
Nanolets are like servlets only that they have a extremely low profile. They offer an easy to use system for a more complex server application.
84
+
This text has to be extended with an example, so for now take a look at the unit tests for the usage. <https://github.com/NanoHttpd/nanohttpd/blob/master/nanolets/src/test/java/fi/iki/elonen/router/AppNanolets.java>
85
85
86
86
## Status
87
87
88
-
We are currently in the process of stabilizing NanoHttpd from the many pull requests and feature requests that were integrated over the last few months. The next release will come soon, and there will not be any more "intended" major changes before the next release. If you want to use the bleeding edge version, you can clone it from Github, or get it from sonatype.org (see "Maven dependencies / Living on the edge" below).
88
+
We are currently in the process of stabilizing NanoHTTPD from the many pull requests and feature requests that were integrated over the last few months. The next release will come soon, and there will not be any more "intended" major changes before the next release. If you want to use the bleeding edge version, you can clone it from Github, or get it from sonatype.org (see "Maven dependencies / Living on the edge" below).
89
89
90
90
## Project structure
91
91
92
92
NanoHTTPD project currently consist of four parts:
93
93
94
-
*`/core` – Fully functional HTTP(s) server consisting of one (1) Java file, ready to be customized/inherited for your own project
94
+
*`/core` – Fully functional HTTP(s) server consisting of one (1) Java file, ready to be customized/inherited for your own project.
95
95
96
96
*`/samples` – Simple examples on how to customize NanoHTTPD. See *HelloServer.java* for a killer app that greets you enthusiastically!
97
97
@@ -107,8 +107,8 @@ NanoHTTPD project currently consist of four parts:
107
107
### Core
108
108
* Only one Java file, providing HTTP 1.1 support.
109
109
* No fixed config files, logging, authorization etc. (Implement by yourself if you need them. Errors are passed to java.util.logging, though.)
110
-
* Support for HTTPS (SSL)
111
-
* Basic support for cookies
110
+
* Support for HTTPS (SSL).
111
+
* Basic support for cookies.
112
112
* Supports parameter parsing of GET and POST methods.
113
113
* Some built-in support for HEAD, POST and DELETE requests. You can easily implement/customize any HTTP method, though.
114
114
* Supports file upload. Uses memory for small uploads, temp files for large ones.
@@ -130,19 +130,19 @@ NanoHTTPD project currently consist of four parts:
130
130
* File server serves also very long files without memory overhead.
131
131
* Contains a built-in list of most common MIME types.
132
132
* Runtime extension support (extensions that serve particular MIME types) - example extension that serves Markdown formatted files. Simply including an extension JAR in the webserver classpath is enough for the extension to be loaded.
133
-
* Simple [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) support via `--cors`paramater
133
+
* Simple [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) support via `--cors`parameter
134
134
* by default serves `Access-Control-Allow-Headers: origin,accept,content-type`
135
135
* possibility to set `Access-Control-Allow-Headers` by setting System property: `AccessControlAllowHeader`
*`--cors`: activates CORS support, `Access-Control-Allow-Origin` will be set to `*`
138
+
*`--cors`: activates CORS support, `Access-Control-Allow-Origin` will be set to `*`.
139
139
*`--cors=some_value`: `Access-Control-Allow-Origin` will be set to `some_value`.
140
140
141
141
**_CORS argument examples_**
142
142
143
143
144
144
*`--cors=http://appOne.company.com`
145
-
*`--cors="http://appOne.company.com, http://appTwo.company.com"`: note the double quotes so that the 2 URLs are considered part of a single argument.
145
+
*`--cors="http://appOne.company.com, http://appTwo.company.com"`: note the double quotes so that the two URLs are considered part of a single argument.
146
146
147
147
## Maven dependencies
148
148
@@ -160,11 +160,11 @@ NanoHTTPD is a Maven based project and deployed to central. Most development env
160
160
161
161
The coordinates for your development environment should correspond to these. When looking for an older version take care because we switched groupId from *com.nanohttpd* to *org.nanohttpd* in mid 2015.
162
162
163
-
Next it depends what you are useing nanohttpd for, there are tree main usages.
163
+
Next it depends what you are using NanoHTTPD for, there are three main usages.
164
164
165
165
## Gradle dependencies
166
166
167
-
In gradle you can use nano http the same way because gradle accesses the same central repository:
167
+
In gradle you can use NanoHTTPD the same way because gradle accesses the same central repository:
168
168
169
169
dependencies {
170
170
runtime(
@@ -202,15 +202,15 @@ Here you write your own subclass of *fi.iki.elonen.NanoWebSocketServer* to confi
202
202
203
203
### Develop a custom HTTP file server
204
204
205
-
For a more classic aproach, perhaps to just create a HTTP server serving mostly service files from your disk, you can use the module with artifactId *nanohttpd-webserver*.
205
+
For a more classic approach, perhaps to just create a HTTP server serving mostly service files from your disk, you can use the module with artifactId *nanohttpd-webserver*.
206
206
207
207
<dependency>
208
208
<groupId>org.nanohttpd</groupId>
209
209
<artifactId>nanohttpd-webserver</artifactId>
210
210
<version>CURRENT_VERSION</version>
211
211
</dependency>
212
212
213
-
The included class *fi.iki.elonen.SimpleWebServer* is intended to be used as a starting point for your own implementation but it also can be used as is. Staring the class as is will start a http server on port 8080 and publishing the current directory.
213
+
The included class *fi.iki.elonen.SimpleWebServer* is intended to be used as a starting point for your own implementation but it also can be used as is. Starting the class as is will start a HTTP server on port 8080 and publishing the current directory.
214
214
215
215
### Living on the edge
216
216
@@ -234,18 +234,18 @@ The latest Github master version can be fetched through sonatype.org:
234
234
</repository>
235
235
</repositories>
236
236
237
-
### generating an self signed ssl certificate
237
+
### generating an self signed SSL certificate
238
238
239
239
Just a hint how to generate a certificate for localhost.
0 commit comments