https://github.com/ericogr/simple-http-server-test
A simple webservice to answer any call and output time, method, content and url
https://github.com/ericogr/simple-http-server-test
Last synced: 10 months ago
JSON representation
A simple webservice to answer any call and output time, method, content and url
- Host: GitHub
- URL: https://github.com/ericogr/simple-http-server-test
- Owner: ericogr
- License: apache-2.0
- Created: 2018-02-15T14:05:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-12T09:53:31.000Z (over 6 years ago)
- Last Synced: 2025-03-13T16:45:36.489Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-http-server-test
A simple webservice to answer any call, log time, method, content and url and returns random ID.
example:
```sh
npm install
./run.sh 8081
```
Calling this ws:
```sh
curl -X POST -d '{"test": 123}' http://localhost:8081/test/123/xpto
```
Return:
```sh
{"id":961776}
```
And WS log:
```sh
Date time: Sun Feb 18 2018 09:29:18 GMT-0300 (-03)
Method: POST
URL: /test/123/xpto
Receive Body: {
"{\"test\": 123}": ""
}
Send body: {"id":961776}
```
Upload files:
```sh
curl -v -F 'file1=@/tmp/file.bin' -F 'file2=@/tmp/file.bin' http://localhost:8080/test
```