Skip to content

Revisit typeclass interface decision for Body #115

Description

@cprussin

Continuation of discussion started here.

@paluh had raised some concerns that perhaps using a typeclass for Body is not the best decision, and we would be better served by making a Record interface something like:

type Body = Record
  { defaultHeaders: Headers
  , writeBody: HTTP.Response -> Aff Unit
  }

Where we left of is that I'm not convinced that typeclasses aren't the right decision here, but I'd like to collect some concrete code examples to discuss the pros/cons of either decision. So before changing from a typeclass, I'd like an awareness of what we'd be losing, and on the flip side, I'd like examples of why a Record interface would be a better decision.

I'd like to resolve this before we release 1.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions