redhttp / red Goto Github PK
View Code? Open in Web Editor NEWA .NET Standard web application framework built on ASP.NET Core w/ Kestrel and inspired by the simplicity of Express.js
Home Page: https://redhttp.github.io/Red/
License: MIT License
A .NET Standard web application framework built on ASP.NET Core w/ Kestrel and inspired by the simplicity of Express.js
Home Page: https://redhttp.github.io/Red/
License: MIT License
I'm trying to make an HTTP server and I'm getting this when trying to connect. Help?
Code:
public async void startServer() {
var server = new RedHttpServer(6969, path);
server.Get("/screen.png", (req, res) => {
string temp = Path.Combine(path, "screenshot.png");
Bitmap bmp = Utils.Screenshot();
bmp.Save(temp, ImageFormat.Png);
res.AddHeader("Content-Type", "image/png");
return res.SendFile(temp);
});
server.WebSocket("/ws", async (req, res) => {
await res.SendText("Welcome to the GooseSocket!");
res.OnTextReceived += async (sender, eventArgs) => {
string msg = eventArgs.Text;
string[] args = msg.Split(' ');
Event e = events.Where(c => c.name.Trim().Equals(args[0].Trim())).FirstOrDefault();
string result = "Invalid Event.";
if (e != null)
result = e.Run(args);
await res.SendText(result);
};
return HandlerType.Final;
});
await server.RunAsync();
}
Your server always fails on Windows 10, on _listener.Start(); in RedHttpServer.cs on Windows 10 with exception System.Net.HttpListenerException: 'Access is denied'
I just curious: have you ever tested your code before publishing?
Hey, thanks for merging the pull request and rolling out a new NuGet package.
I just pulled down the 3.5.1 NuGet package. I'm seeing the package now has .NET Standard 2.0 target but I'm not seeing the Values property on RequestParameters (even though I see on your GitHub site the code change is there).
Did you recompile to create the NuGet package with the Values property on RequestParameters? Maybe I'm doing something wrong but I'm not seeing it.
Hello,
We've tried to activate or update your repository on Depfu and couldn't find any supported dependency files. If we were to guess, we would say that this is not actually a project Depfu supports and has probably been activated by error.
Please note that Depfu currently only searches for your dependency files in the root folder. We do support monorepos and non-root files, but don't auto-detect them. If that's the case with this repo, please send us a quick email with the folder you want Depfu to work on and we'll set it up right away!
Please note that using the "All Repositories" setting doesn't make a lot of sense with Depfu.
Please let us know by sending an email to [email protected].
This is an automated issue by Depfu. You're getting it because someone configured Depfu to automatically update dependencies on this project.
Alright so the code i use to get the path is
path = Path.GetFullPath(Path.Combine(API.Helper.getModDirectory(this), "..", "..", "..", "htdocs")+"/");
(equal to C:\Users\[censored]\OneDrive\Skrivbord\goose\htdocs\
)
but when Red loads it says Content root path: C:\Users\[censored]\OneDrive\Skrivbord\goose\
help?
How to get demo file ./public
Is it possible to listen on all interfaces?
It seems to only accept local connections.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.