public async Task AddUpdateMessageContract(string type, string topicId, MessageContractInput input) { var reqContent = new StringContent( content: _serializer.Serialize(new { Description = input.Description, Content = input.Content }), encoding: Encoding.UTF8, mediaType: "application/json" ); var response = await _client.PutAsync($"/api/v1/topics/{topicId}/messageContracts/{type}", reqContent); HttpResponseHelper.EnsureSuccessStatusCode(response); }
public async Task <IActionResult> CreateMessageContract(string topicId, [FromBody] MessageContractInput input) { try { await _capabilityServiceClient.CreateMessageContract(input.Type, input.Description, input.Content, topicId); } catch (HttpRequestException) { return(BadRequest()); } return(NoContent()); }
public Task AddUpdateMessageContract(string type, string topicId, MessageContractInput input) { return(Task.CompletedTask); }
public Task AddUpdateMessageContract(string type, string topicId, MessageContractInput input) { throw _error; }
public async Task <IActionResult> AddUpdateMessageContract(string topicId, string type, [FromBody] MessageContractInput input) { try { await _capabilityServiceClient.AddUpdateMessageContract(type, topicId, input); } catch (HttpRequestException) { return(BadRequest()); } return(NoContent()); }