private Response HandlePostInteractionsRequest(NancyContext context) { var interactionJson = ReadContent(context.Request.Body); var interaction = JsonConvert.DeserializeObject <ProviderServiceInteraction>(interactionJson); _mockProviderRepository.AddInteraction(interaction); return(GenerateResponse(HttpStatusCode.OK, "Added interaction")); }
private Response HandlePostInteractionsRequest(NancyContext context) { var interactionJson = ReadContent(context.Request.Body); var interaction = JsonConvert.DeserializeObject <ProviderServiceInteraction>(interactionJson); _mockProviderRepository.AddInteraction(interaction); _log.InfoFormat("Registered expected interaction {0} {1}", interaction.Request.Method.ToString().ToUpperInvariant(), interaction.Request.Path); _log.Debug(JsonConvert.SerializeObject(interaction, JsonConfig.PactFileSerializerSettings)); return(GenerateResponse(HttpStatusCode.OK, "Added interaction")); }