public async Task <IActionResult> Post(string clientId, string key, [FromBody] SetRequestModel model) { if (!_inputValidator.IsValidClientId(clientId)) { return(BadRequest(ResponseModel.CreateWithError(ErrorType.Validation, InvalidClientIdMessage))); } if (!_inputValidator.IsValidKey(key)) { return(BadRequest(ResponseModel.CreateWithError(ErrorType.Validation, InvalidKeyMessage))); } if (!_inputValidator.IsValidPayload(model.Data)) { return(BadRequest(ResponseModel.CreateWithError(ErrorType.Validation, InvalidPayloadMessage))); } if (!_inputValidator.IsValidPayloadSize(model.Data)) { return(BadRequest(ResponseModel.CreateWithError(ErrorType.Validation, TooBigPayloadMessage))); } await _clientDictionary.SetAsync(clientId, key, model.Data); return(Ok(ResponseModel.CreateWithData(null))); }