How do I reference a JSON body from HTTP Post in a Sharp API?

I see. I didn’t know that. So is “x” what a new .NET Core Web API with Docker support would be launching with?

As per the docs x is the new .NET Core 3.1 tool, you were even updating the x dotnet tool, why weren’t you using it?

Probably just a result of me being admittedly a little ignorant (and possibly behind the times) with respect to these numerous .NET tools available and keeping up with them and understanding what they all do.

I guess I didn’t understand the relation between “x” when installing something vs running something. I thought that’s what “web” was for.

I’m going to run this code as it would be deployed to EC2 and see what happens.

Thanks

So following up on this, I just saw this in the docs:

Then run x without any arguments to view Usage:

Then why does ‘x’ also run an app? Maybe that’s why I was confused.

Is there docs that haven’t been updated telling you to use web? I thought all the docs were clear to use x?

Because having app.settings in the current directory indicates it’s a Sharp App to run instead.

Let me try and locate where I saw a reference to that recently. Standby…

Looks like the apps from x new are still showing this:

Run as a .NET Core Web App (Windows, macOS, Linux):

$ dotnet tool install -g web
$ web new bare-webapp ProjectName
$ cd ProjectName
$ web

That’s where I got the idea to use web to run the app. This example was from bare-app.

Can you provide the link where you copied + pasted that from? I thought I’ve updated them all.

Or is this in your local README?

I’ve renamed all -webapp to -app, upgraded each to use the latest syntax and should’ve upgraded all the examples to use x dotnet tool a few hours ago. If you find any that are still indicating to use web let me know.

Yep, looks like a local copy of the README. So how do I force an update? Creating a new bare-app doesn’t seem to update it.

had to publish a new GitHub release, please try again.

That did the trick. Thanks!

I also don’t know why your Custom ScriptMethod isn’t loalding, I’ve tested it in the new scratch app, by copying the Plugin.dll to /plugins then creating and viewing a test page:

$ echo "{{ 'world' |> hi }}" > scripts.html
$ x

Then viewing it on https://localhost:5001/scripts which prints out:

"Hi world"

Maybe running it with web instead of x? I’ll try it again in about an hour and let you know.

ok don’t worry testing it if you were just using web, I’ve got to get back and get some work done anyway.