Skip to content

This repository contains a simple web service that can be used for testing.

License

Notifications You must be signed in to change notification settings

pegasystems/docker-mock-web-service

Repository files navigation

Mock Web Service

This repository contains a simple web service that can be used for testing.

Build Status

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"} }

About

This repository contains a simple web service that can be used for testing.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published