Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResponseGenerator: DRY up and relax method implementations #2614

Merged
merged 1 commit into from Jun 6, 2019

Conversation

@diesalbla
Copy link
Contributor

@diesalbla diesalbla commented Jun 1, 2019

  • DRY out a method addEntityLenght, which transforms a set of headers by addding the Content-Length of an entity, if the length of that entity is known.
  • Relax type-class constraint of several methods from Monad to Applicative.
@diesalbla diesalbla force-pushed the ResponseGenerator_factor_methods branch from 3005932 to ac60ef1 Jun 1, 2019
- We extract a method `addEntityLenght`, which transforms a set of
  headers by addding the `Content-Length` of an entity, if the length
  of that entity is known.
- We relax the type-class constraint of several methods, from Monad to Applicative.
@diesalbla diesalbla force-pushed the ResponseGenerator_factor_methods branch from ac60ef1 to 4484111 Jun 1, 2019
Copy link
Member

@rossabaker rossabaker left a comment

I think the Monad used to be necessary and ceased to be when EntityEncoder became pure, and we never caught it. This looks good to me.

Loading

@aeons aeons merged commit b3ea4b2 into http4s:master Jun 6, 2019
1 check passed
Loading
@diesalbla diesalbla deleted the ResponseGenerator_factor_methods branch Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants