Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Relaxes the spec requirements for afterResponse
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
goatslacker committed Aug 23, 2016
1 parent e43232f commit 90ea841
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/client-spec.md
Expand Up @@ -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

Expand Down

0 comments on commit 90ea841

Please sign in to comment.