Skip to content

Action support for “respond_to” #491

@timriley

Description

@timriley

This needs to be “native” to the way Hanami::Action operates, so: explicit receivers, no implicit state.

Maybe it just hangs off the request?

def handle(request, response)
  request.respond_to do |format|
    format.json do
      # ...
    end
  end
end

Either way, we of course have control over what goes into the request/response objects before they get passed into #handle, so we can set them up to have the information they need to expose this API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions