Empty Space
  • Home
  • Resume
  • Posts
  • Personal
  • Code
Sign in Subscribe
code

.NET HTTPS RESTful API call

  • Robin Michael

Robin Michael

Mar 27, 2019

Because .NET Core 2.2 has switched over to serving from https by default on port 5001 which can be a problem when you are debugging locally use cURL and jq for API testing from the command line

Following is from the default WebAPI project

curl -X GET https://localhost:5001/api/values -H 'cache-control: no-cache' --insecure | jq '.'

Sign up for more like this.

Enter your email
Subscribe

Enhancing the console.log

Messing around with the console.log and in particular the %c stylized log and tried some experiments and you can enhance the log to render out images etc and in this case I am making a canvas element to hold text and styling it so that the log And here
May 29, 2023 1 min read

Detect PNG image header in data stream

Byte check header for the PNG header in a data stream public static bool HasPngImageHeader(byte[] imageContents) { byte[] imageHeader = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A }; return imageContents.Take(8).SequenceEqual(imageHeader); }
May 22, 2023

Hapijs + MapBox + Glitch Example

Built out a MapBox test page for use and decided to use glitch.com because it is easy to get something live to test with and then embed and here is the code.  Had to get back into the nodejs frameset and working with hapijs after a few years rust,
Apr 16, 2023
Empty Space © 2023
Powered by Ghost