/// <summary> /// Retrieves an HttpImposter along with information about requests made to that /// imposter if mountebank is running with the "--mock" flag. /// </summary> /// <param name="port">The port number of the imposter to retrieve</param> /// <returns>The retrieved imposter</returns> /// <exception cref="MbDotNet.Exceptions.ImposterNotFoundException">Thrown if no imposter was found on the specified port.</exception> /// <exception cref="MbDotNet.Exceptions.InvalidProtocolException">Thrown if the retrieved imposter was not an HTTP imposter</exception> public async Task <RetrievedHttpImposter> GetHttpImposterAsync(int port) { var imposter = await _requestProxy.GetHttpImposterAsync(port).ConfigureAwait(false); ValidateRetrievedImposterProtocol(imposter, Protocol.Http); return(imposter); }