src/BloomExe/web/controllers/ApiRequest.cs
/// <summary>
/// Gets the JSON data from a POST request
/// </summary>
/// <returns>If the request's content type is "application/json", returns the data as a JSON string
/// If the request's content type is not "application/json", returns null instead</returns>
Gets the JSON data from a POST request
Gets the JSON data from a POST request
public string GetPostJsonOrNull()
		{
			string contentType = RequestContentType;	
			if (contentType == null || !contentType.ToLowerInvariant().Contains("application/json"))
			{
				return null;
			}
			return GetPostJson();
		}
public string GetPostJsonOrNull ( ) { string contentType = RequestContentType ; if ( contentType == null || ! contentType . ToLowerInvariant ( ) . Contains ( " " ) ) { return null ; } return GetPostJson ( ) ; }
Gets the JSON data from a POST request
Gets the JSON data from a POST request
// Note: could contain suffixes like charset=[...]
If the request's content type is "application/json", returns the data as a JSON string
If the request's content type is not "application/json", returns null instead
If the request ' s content type is " application / json " returns the data as a JSON string If the request ' s content type is not " application / json " returns null instead