Sign in Go Pro

MockWebServer

Handling Requests with RESTMock

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next

Previous

About

The Dispatcher is a powerful way to define the desired behavior of MockWebServer. However, the syntax is a bit verbose, and spelling out responses as JSON strings is a bit clumsy. We can use the RESTMock library to make it easier.

In this lesson you will learn:

  • How to set up RESTMock
  • How to use Hamcrest matchers with RESTMock
  • How to tell RESTMock to return the content of a file as response
  • How to verify requests with RESTMock

Instructor

Links

Lessons in MockWebServer