public void CreateImposter(Imposter imposter) { var json = JsonConvert.SerializeObject(imposter); var response = ExecutePost(ImpostersResource, json); HandleResponse(response, HttpStatusCode.Created, $"Failed to create the imposter with port {imposter.Port} and protocol {imposter.Protocol}."); }
/// <summary> /// Submits imposter if pending to be created in mountebank. /// Will throw a MountebankException if unable to create the imposter for any reason. /// </summary> public void Submit(Imposter imposter) { Submit(new [] { imposter }); }