public async Task <ActionResult <GetRatingByProductIdResponse> > GetRatingByProductId(Guid productId) { _logger.LogDebug($"VND: {HttpContext.Request.Headers.ToArray().ToString()}"); GetRatingByProductIdResponse rating = await _ratingService.GetRatingByProductIdAsync(new GetRatingByProductIdRequest { ProductId = productId }); return(Ok(rating)); }
public async Task <GetRatingByProductIdResponse> GetRatingByProductIdAsync(GetRatingByProductIdRequest request) { string getProductEndPoint = $"{_ratingServiceUri}/api/v1/ratings/{request.ProductId}"; RestClient.SetOpenTracingInfo(request.Headers); GetRatingByProductIdResponse response = await RestClient.GetAsync <GetRatingByProductIdResponse>(getProductEndPoint); return(response); }