If-None-Match header always null in asp.net core controller -
i send request "if-none-match" header postman, it's null in controller.
i'm using asp.net core 1.1.
is there wrong code?
if (request.headers.containskey("if-none-match")) { var oldetag = request.headers["if-none-match"].first(); if (cache.get($"tenant-{id}-{oldetag}") != null) { return statuscode((int)httpstatuscode.notmodified); } } update 1
i create new request both if-match & if-none-match header, if-match header exists in controller if-none-match still null.

you wrong header in debugger. instead on
headerifmatchcheckheaderifnonematchrequest.headers.containskey("if-none-match")- code fine , works me via postman. but, accordingly screenshot, looks addif-none-matchquery parameter, not header.


Comments
Post a Comment