Skip to content

Commit 16e44db

Browse files
authored
Update README.md
1 parent 1d5ccb9 commit 16e44db

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,42 @@ Simple and Low footprint TCP/IP Web Server for Android in Java
33

44
This is standalone, multithreaded, almost or No dependancy ! http server in Java with example use in Android.
55

6-
# How to use it in Android
6+
## How to use it in Android?
77

88
1. Copy TinyWebServer.java class from src dir to your android project package
99
2. Call following from android service or process
1010

11-
//call contructor with local ip, port , public html directory path
11+
12+
```java
13+
//call contructor with local ip, port , public html directory path
1214
TinyWebServer.startServer("localhost",9000, "/web/public_html");
15+
```
1316

14-
# How to write custom api
17+
## How to write custom api?
1518

1619
1. Copy AppApis.java from src directory
1720
2. keep the package name same for AppApis.java like "appapis.queryfiles"
1821
3. open AppApis.java and write your own mehtod/function inside AppApis.java
1922
for example,
20-
23+
24+
```java
2125
public String myfirstapi(HashMap qparms){
2226
//todo - write your api logic here
2327
//qparms is collection of GET and POST parameters
2428
}
29+
```
2530

2631
you can access this api -> http://localhost/myfirstapi
2732

2833

2934

30-
# How to check demo
31-
Run the code and hit browser with http://localhost:9000/helloworld
32-
> here port number is 9000
33-
> localhost or your device ip address
34-
> helloworld is api method inside AppApis.java
35+
## How to check demo?
36+
- Run the code and hit browser with http://localhost:9000/helloworld
37+
- here port number is 9000
38+
- localhost or your device ip address
39+
- helloworld is api method inside AppApis.java
3540

3641

37-
42+
Design, Build, Tested by
43+
@github/sonuauti
3844

0 commit comments

Comments
 (0)