fix: resolved issues with setDeviceStreamDebug; refactor: added static method GetRequestBody

This commit is contained in:
jdevito
2023-02-01 13:22:12 -06:00
parent a3346d5ef4
commit e1d7374f1e
6 changed files with 129 additions and 35 deletions

View File

@@ -1,11 +1,23 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp.WebScripting;
using PepperDash.Core;
namespace PepperDash.Essentials.Core.Web
{
public class EssentialsWebApiHelpers
{
public static string GetRequestBody(HttpCwsRequest request)
{
var bytes = new Byte[request.ContentLength];
request.InputStream.Read(bytes, 0, request.ContentLength);
return Encoding.UTF8.GetString(bytes, 0, bytes.Length);
}
public static object MapToAssemblyObject(LoadedAssembly assembly)
{
return new