protected override async Task OnInitAsync() { //Logger.LogDebug($"Starting OnInitAsync"); ////Logger.LogDebug($"Initializing IServiceClient"); // Someday this will work //IServiceClient client = new JsonHttpClient("http://localhost:21100"); ////Logger.LogDebug($"client is null: {client == null}"); InitializationReqDTO initializationReqDTO = new InitializationReqDTO(); //Logger.LogDebug($"Calling PostJsonAsync<BaseServicesInitializationRspPayload>"); InitializationRspDTO = await HttpClient.PostJsonAsync <InitializationRspDTO>("Initialization", initializationReqDTO); //Logger.LogDebug($"Returned from PostJsonAsync<InitializationRspDTO>, InitializationRspDTO = {InitializationRspDTO}"); //Logger.LogDebug($"Leaving OnInitAsync"); }
// Access the Logging extensions registered in the DI container //[Inject] //public ILogger<BasicRESTServicesCodeBehind> Logger { get; set; } #endregion #region Page Initialization Handler protected override async Task OnInitAsync() { //Logger.LogDebug($"Starting OnInitAsync"); InitializationReqDTO initializationReqDTO = new InitializationReqDTO(); //Logger.LogDebug($"Calling PostJsonAsync<BaseServicesInitializationRspPayload>"); InitializationRspDTO = await HttpClient.PostJsonAsync <InitializationRspDTO>("Initialization", initializationReqDTO); //Logger.LogDebug($"Returned from PostJsonAsync<InitializationRspDTO>, InitializationRspDTO: {InitializationRspDTO}"); // create the instance of the ComplexData to be posted reqComplexData = new ComplexData() { // initialize the fields StringData = "Set By OnInitAsync", DateTimeData = DateTime.UtcNow, TimeSpanData = default,
public object Post(InitializationReqDTO request) { return(new InitializationRspDTO { }); }