EmbeddedJettyProbe – a simple tool for checking your HTTP requests

Updated: Jun 18, 2018



EmbeddedJettyProbe is a small tool for examining the contents of HttpRequests that arrive at an embedded Jetty instance. This is useful for tests that need to validate the behavior of an http client. For example (scala):



In the above example requestArrivingAtServer has 2 properties: body and headers which contain the data from the HttpRequest arriving at the server. You can for example check the request body using:



It uses an ArrayBlockingQueue as a means to pass the incoming request between the Jetty request handler thread and the test thread.


This post was written by Sagy Rozman

You can follow him on Twitter

#TDD #unittest

64 views0 comments

Recent Posts

See All