HBResponseEncoder

public protocol HBResponseEncoder

protocol for encoders generating a Response

  • Encode value returned by handler to request

    Declaration

    Swift

    func encode<T>(_ value: T, from request: HBRequest) throws -> HBResponse where T : Encodable

    Parameters

    value

    value to encode

    request

    request that generated this value