![](https://unityassetlab.com/wp-content/uploads/2023/12/Simple-HTTP-and-REST-Server.png)
Use this asset to create a HTTP server within Unity to provide an REST API for exchanging data with other tools.
π How can this asset help me?
Exchanging information between Unity and another program is complicated. This asset provides a simple and fast way to ensure the exchange of information in both directions.
π§ Simple Routing
Implementing routes in Unity has never been easier! With a simple attribute that you write over the function you can specify both the HTTP method and the path.
β Event Based
The server utilizes an event-based system to register all route handlers. Simply drag and drop the desired route handler into the server. Additionally, the event-based system is capable of supporting programmatic events.
π¦ Resource Loading
Using Resource Loading you can load files from the Resources folder of your game and output them via the HTTP server. See the example β2. Load Files from Resource Folderβ in the Examples folder.
β‘ Fast
The speed of the server is overwhelming, which is achieved by using only native implementations. To ensure this, external libraries were deliberately avoided during development.
π Multiple Instances
The event based architecture makes it possible to run many different servers over different ports at the same time.
π Listening Addresses
Under Listening Addresses you can not only select the ports to listen on, but also specify whether the server is accessible from the home network or only from the same computer.
π₯οΈ Platform support
β
Windows (Mono/IL2CPP Builds)
β
Linux (Mono/IL2CPP Builds)
β
Mac OS M1 (Mono/IL2CPP Builds)
β
Mac OS Intel (Mono/IL2CPP Builds)
β Android (Currently not supported)
β iOS (Currently not supported)
β WebGL (Not supported)
β Game Consoles (Not supported)
Simple Routing: Register new endpoints fast and easy
Event Based: Easy registration of handlers by drag and drop
Resource Loading: Support for loading resources from the resource folder
Multiple Instances: Allows to host multiple servers on different ports simultaneously
Fast: Very short response times due to native implementation
Listening Addresses: Allows selecting multiple ports per server and restricting access to localhost or homenetwork
Supports all HTTP Methods: HEAD, GET, POST, PUT, DELETE, OPTIONS
“If You Want To Use This Assets in Your Game, Make Sure To Buy a License From The Author.”
Download Unity Assets Free for Learning purpose. Simple HTTP and REST Server v1.6