skip to Main Content

Json – why are properties in my response object set to null?

I have this endpoint method: var authToken = await [url] .AddAuthHeaders(config) .PostJsonAsync(new AuthTokenRequest { GrantType = "test", ClientId = "test", ClientSecret = "test", Audience = "test" }) .ReceiveJson<AuthTokenResponse>(); It's calling this endpoint: [HttpPost] public IActionResult Get([FromBody] object request) { try…

VIEW QUESTION

how to implement Gzip compressor for one endpoint in .NET core – Asp.net

I have a .NET core project (EntityRelationship) and enable the Gzip compressor for that project. Program.cs using EntityRelationship.Data; using Microsoft.AspNetCore.ResponseCompression; using Microsoft.EntityFrameworkCore; using System.IO.Compression; var builder = WebApplication.CreateBuilder(args); // Add services to the container. ... builder.Services.AddResponseCompression(options => { options.EnableForHttps =…

VIEW QUESTION

Unable to run Docker .NET 6 console image – Debian

Hi I have below dockerfile for .NET 6 console app FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["MyProj/MyProj.csproj", "MyProj/"] RUN dotnet restore "MyProj/MyProj.csproj" COPY . . WORKDIR "/src/MyProj" RUN dotnet build "MyProj.csproj" -c Release…

VIEW QUESTION
Back To Top
Search