Sign in Go Pro

MockWebServer

Handling Nondeterministic Requests with Dispatcher

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next

Previous

About

Enqueue is an easy way to tell MockWebServer what to return when it gets a request. However, when the incoming requests are not in a deterministic order, or when you want to derive the response based on the request, you will need to write custom login with Dispatcher.

In this lesson you will learn:

  • What happens when you try to enqueue responses for the order of incoming requests are not deterministic. -
  • How to set up a Dispatcher for MockWebServer
  • How to derive a response from the request in the Dispatcher

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in MockWebServer