Commit Graph
2 Commits
Author SHA1 Message Date
LORDofDOOM 4881e4c96a [Core] Add netstandard20 target to OpenHardwareMonitorLib, drop old OpenHardwareMonitorLibNetStandard, drop App.config (not needed), upgrade sln to VS15 (mixed targets dont works in older VS versions), add RuntimeIdentifiers to prevent build errors in current VS 2017-11-23 00:54:44 +01:00
Marcus Tillmanns fc0cd04b53 Adding a REST like web api and introducing Json.NET
Adds the ability to handle simple REST like api calls to the Webserver.

If a POST request is received by the webserver it calls HttpServer::HandlePostRequest

"Get" Action Example:
http://localhost:8085/Sensor?action=Get&id=/ltc/example/0

This will return a JSON response containing either the value of the Sensor
or an error message.

Example response:
If it succeeded:
	{ "result" : "ok", "value" : "42" }
If it failed:
	{ "result" : "fail" , "message" : "Some error message" }

"Set" Action Example:
http://localhost:8085/Sensor?action=Set&id=/ltc/example/0&value=42.0

This will try to set the Control value of the specified Sensor.

Example response:
If it succeeded:
        { "result" : "ok" }
If it failed:
        { "result" : "fail" , "message" : "Some error message" }

The TestScripts folder contains 3 python scripts that demonstrate the
usage of the WebServer and the WMI provider.
2017-09-18 23:49:48 +02:00