From e8cf957f1506a2790259e3c9ad6004f69732d8c6 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 3 Dec 2015 17:50:34 +0000 Subject: [PATCH] Update documentation to mention that you can write custom preprocessors Closes gh-156 --- .../customizing-requests-and-responses.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc b/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc index f88a5879..37ca4e0a 100644 --- a/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc +++ b/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc @@ -84,4 +84,15 @@ from the request or response. `replacePattern` on `Preprocessors` provides a general purpose mechanism for replacing content in a request or response. Any occurrences of a regular expression are -replaced. \ No newline at end of file +replaced. + +[[customizing-requests-and-responses-preprocessors-writing-your-own]] +==== Writing your own preprocessor + +If one of the built-in preprocessors does not meet your needs, you can write your own by +implementing the `OperationPreprocessor` interface. You can then use your custom +preprocessor in exactly the same way as any of the built-in preprocessors. + +If you only want to modify the content (body) of a request or response, consider +implementing the `ContentModifier` interface and using it with the built-in +`ContentModifyingOperationPreprocessor`. \ No newline at end of file