// HandleBuild handles the associated build step of middleware stack
HandleBuild handles the associated build step of middleware stack
// HandleBuild handles the associated build step of middleware stack
func (m *acceptHeader) HandleBuild(
	ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
	out middleware.BuildOutput, metadata middleware.Metadata, err error,
) {
	req, ok := in.Request.(*http.Request)
	if !ok {
		return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
	}
	const conHeader = "Accept"
	req.Header[conHeader] = append(req.Header[conHeader][:0], "application/json")
	return next.HandleBuild(ctx, in)
}
func ( m * acceptHeader ) HandleBuild ( ctx context . Context , in middleware . BuildInput , next middleware . BuildHandler ) ( out middleware . BuildOutput , metadata middleware . Metadata , err error , ) { req , ok := in . Request . ( * http . Request ) if ! ok { return out , metadata , fmt . Errorf ( " " , in . Request ) } const conHeader = " " req . Header [ conHeader ] = append ( req . Header [ conHeader ] [ : 0 ] , " " ) return next . HandleBuild ( ctx , in ) }
HandleBuild handles the associated build step of middleware stack
HandleBuild handles the associated build step of middleware stack
// all APIGateway operations must have Accept header set to application/json