-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement HTTP API #3599
Implement HTTP API #3599
Conversation
Beautiful initiative. I see you want to implement getting players & max player count for starters. That's good! |
What about HTTPS? And securing the api with an api key optionally? |
I want to implement every function + maybe more 😉 |
HTTPS is out of control of this PR. Hmm, api key might be generated via mta server. I'll keep that in mind when everything is done |
Will this API feature be enabled by default? Possibly through a MTAserver.conf setting. |
probably, yes |
Add at least some option to create custom api, mark old approach as outdated, change ehs lib to something more modern. Otherwise this feature will be underutilized |
It will be added later
What old approach? exports?
Other PR maybe |
It is already possible to implement your own HTTP API in Lua resources. |
Yes but its very limited. With this approach its very flexible and it is possible to easily adjust it to your needs without needing any resources. |
How exactly does this feature use EHS? Aren't there any implications of using an ancient implementation again, but for something else? It's already causing a ton of issues in its utilization for MTA's internal HTTP server. |
It only utilises EHS to register an endpoint. Everything else is handled by the mta code |
The highest level of adjustment/customization options will come from it being implemented in Lua. There has been a general trend of servers re-implementing hardcoded features (the chatbox, F11 map, etc) in Lua for this reason.
Not ideal, but I think that is an improvement that can be made to the current scheme. |
there is no point in having a lua resource just for that. |
In my opinion, http server should be removed from server and instead separete application should be used to serve file and all http code should be removed from mta. Most hosting novadays offer separete "fast download" server anyway. |
What if NodeJS were implemented on the server side? When integrated into MTA, it could be suitable for many things, including this. |
there is no reason to include nodejs into already bloated code. |
Im convinced that we have all we need with botder's newly added router features |
This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically. |
Im not interested in advancing this PR further anymore. |
This PR will allow you to fetch information from the server using the HTTP API.
I want it to work exactly like discord api (token, gateways, etc.)