https://github.com/pegasystems/docker-mock-web-service
This repository contains a simple web service that can be used for testing.
https://github.com/pegasystems/docker-mock-web-service
Last synced: 2 months ago
JSON representation
This repository contains a simple web service that can be used for testing.
- Host: GitHub
- URL: https://github.com/pegasystems/docker-mock-web-service
- Owner: pegasystems
- License: apache-2.0
- Created: 2020-02-07T15:58:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-29T17:57:16.000Z (over 2 years ago)
- Last Synced: 2026-04-21T07:38:16.696Z (3 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 3
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Mock Web Service
This repository contains a simple web service that can be used for testing.
[](https://travis-ci.org/pegasystems/docker-mock-web-service)
For testing purposes, the server runs on two ports 8080 and 8089. Both ports have the same content
The service exposes the following methods
| path | description | parameters | returns |
| ---- | ----------- | ---------- | ------- |
| / | returns a simple message | | { "message" : "Hello, World!" } |
| /echo | returns a configurable message | message - a string to send back, defaults to "" | {"method" : (the http method used), "message" : (the message value) } |
| /delay | waits for a configurable amount of time and returns a message | seconds - the number of seoconds to wait, defaults to 5 | { "seconds" : (the number of seonds waited) } |
| /code | returns a response with a given status code | responsecode - the response code to use, defaults to 200 | {"responsecode" : (the response code)}
| /hostinfo | returns hostname and ip of server | | {"hostname": "09d79b1445bd", "hostip": "172.17.0.2"} |
| /metrics | returns prometheus metrics for the server | |
| /cookies | returns the cookies that are set on the request and optionally set a cookie on the response | key - the cookie key to set on the response, value - the cookie value to set on the response | { "cookies" : {"cookiekey" : "cookievalue"} } |