src/BloomExe/web/controllers/ApiRequest.cs
/// <summary>
/// Get an enum value of type T that was passed as application/json
/// </summary>
/// <typeparam name="T"></typeparam>
/// <remarks>requires something like this:
///    axios.post("api/bloom/foo", myEnum, {
///       headers: { "Content-Type": "application/json" }});
/// </remarks>
/// <returns>An enum value</returns>
Get an enum value of type T that was passed as application/json
Get an enum value of type T that was passed as application / json
internal T RequiredPostEnumAsJson<T>()
		{
			Debug.Assert(typeof(T).IsEnum, "Type passed to RequiredPostEnumAsJson() is not an Enum.");
			return (T)Enum.Parse(typeof(T), RequiredPostJson());
		}
internal T RequiredPostEnumAsJson < T > ( ) { Debug . Assert ( typeof ( T ) . IsEnum , " " ) ; return ( T ) Enum . Parse ( typeof ( T ) , RequiredPostJson ( ) ) ; }
Get an enum value of type T that was passed as application/json
Get an enum value of type T that was passed as application / json
An enum value
An enum value
typeparam
None
remarks
requires something like this:
axios.post("api/bloom/foo", myEnum, {
headers: { "Content-Type": "application/json" }}).
requires something like this : axios . post ( " api / bloom / foo " myEnum { headers : { " Content - Type " : " application / json " }} ) .