mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 13:07:18 +00:00
fix: resolved issues with setDeviceStreamDebug; refactor: added static method GetRequestBody
This commit is contained in:
parent
a3346d5ef4
commit
e1d7374f1e
6 changed files with 129 additions and 35 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue