From 90ea8412c4b02df624c1b443b5bb5fb39c0d7e66 Mon Sep 17 00:00:00 2001 From: Josh Perez Date: Tue, 23 Aug 2016 14:34:19 -0700 Subject: [PATCH] Relaxes the spec requirements for afterResponse Spec currently states that we should call String/toString on the response after we've called afterResponse method. This change is to relax those requirements enabling you to pass whatever type you'd like. The end result should still be a string (of HTML ideally) but I don't think we have to specify that. --- docs/client-spec.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/client-spec.md b/docs/client-spec.md index b32c49c..b84db12 100644 --- a/docs/client-spec.md +++ b/docs/client-spec.md @@ -20,10 +20,7 @@ - 6.2 Ensure that every job has an `html` field and that it is a string. If there is no HTML then use the fallback client-rendered output. 7. Call `onSuccess(response, jobs)`. 8. Call `afterResponse(currentResponse, originalResponse)` as a reducer. - - 7.1 Call `String()` on the result. - - 7.2 If `afterResponse` is not defined then combine all of the response's `html` fields into a string. -9. If an error is encountered then return the string of HTML for client-rendering. - - 8.1 Call `onError(error, jobs)`. +9. If an error is encountered then call `onError(error, jobs)` and assert that the fallback HTML is provided. ## Client URL and Request Information