Monthly Archives: September 2022

Allowing an empty JSON body, or no Content-Type, in a C# ASP.NET Core API

You may be here because you’re getting this: {“type”:”″,”title”:”Unsupported Media Type”,”status”:415,”traceId”:”00-0d785f3d1cb4fd71bc36ee25561e4b48-6bc5df1f0d070024-00″} Or this: {“type”:”″,”title”:”One or more validation errors occurred.”,”status”:400,”traceId”:”00-8ab7d4ff2d97d5ec040c25058b8d6fff-64b7c8e21e11563b-00″,”errors”:{“”:[“A non-empty request body is required.”]}} Or even this: {“type”:”″,”title”:”One or more validation errors occurred.”,”status”:400,”traceId”:”00-2fec89d15f0fbc0a7deaf1dd96656e15-e7fabe160575f645-00″,”errors”:{“$”:[“The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: […]

Moving columns in PowerQuery without naming every column

If you have pivoted data, you probably don’t want to name all the columns to move one, as a lot of them are going to contain dynamic data. The solution is to use the list of columns, manually moving the one you want into the desired position, as such: = Table.ReorderColumns(PreviousStepName, List.InsertRange(List.RemoveItems(Table.ColumnNames(PreviousStepName), {“ColumnToMove”}), 4, {“ColumnToMove”})) […]