public async Task <Endpoint> GetEndpointByPathAndMethod(string path, string method,
                                                                IHeaderDictionary requestHeaders)
        {
            var endpoints        = (await EndpointService.FindByPathAndMethod(path, method));
            var suitableEndpoint = endpoints.FirstOrDefault(endpoint => ValidateEndpoint(endpoint, requestHeaders));

            if (suitableEndpoint?.OutputDataFile == null)
            {
                return(suitableEndpoint);
            }
            var file = await FileService.Get(suitableEndpoint.OutputDataFileId);

            suitableEndpoint.OutputData = file;
            return(suitableEndpoint);
        }
 public async Task <Endpoint> GetEndpointByPath(string path) =>
 (await EndpointService.FindByParameter(nameof(Endpoint.Path), path)).FirstOrDefault();