func decodeRequest(ctx context.Context, r *http.Request) (interface{}, error) {
	var request Request
	if err := json.NewDecoder(r.Body).Decode(&request); err != nil {
		return nil, err
	}
	return request, nil
}
DecodeRequest decodes FetcherRequest
package fetch
import (
	"context"
	"encoding/json"
	"errors"
	"io"
	"net/http"
	"github.com/go-kit/kit/endpoint"
	httptransport "github.com/go-kit/kit/transport/http"
	"github.com/gorilla/mux"
	"github.com/slotix/dataflowkit/errs"
)
func newHttpHandler(ctx context.Context, endpoint endpoints) http.Handler {
	r := mux.NewRouter()
	r.UseEncodedPath()
	options := []httptransport.ServerOption{
		httptransport.ServerErrorEncoder(encodeError),
	}
	r.Methods("GET").Path("/ping").HandlerFunc(healthCheckHandler)
	r.Methods("POST").Path("/fetch").Handler(httptransport.NewServer(
		endpoint.fetchEndpoint,
		decodeRequest,
		encodeFetcherContent,
		options...,
	))
	return r
}