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

58 views0 comments
  • Black Twitter Icon
  • Black YouTube Icon

At Wix Engineering we develop some of the most innovative cloud-based web applications that influence our +180 million users worldwide.

Have any questions?
Email: wixeng@wix.com

Trademarks and logos of other parties appearing in this post are the property of their respective holders.

Get Wix Engineering Straight to Your e-mail