pub fn publish_verification_results(links: Vec<Link>, broker_url: String, auth: Option<HttpAuth>, result: TestResult, version: String, build_url: Option<String>)
  -> impl Future<Item = (), Error = PactBrokerError> {
  let publish_link = links.iter().cloned().find(|item| item.name.to_ascii_lowercase() == "pb:publish-verification-results")
    .ok_or(PactBrokerError::LinkError("Response from the pact broker has no 'pb:publish-verification-results' link".into()));
  future::done(publish_link)
  .and_then(move |publish_link| {
    let json = build_payload(result, version, build_url);
    let hal_client = HALClient::with_url(broker_url.clone(), auth.clone());
    hal_client.post_json(publish_link.href.clone().unwrap(), json.to_string())
  })
}
/// Publishes the result to the "pb:publish-verification-results" link in the links associated with the pact
Publishes the result to the "pb:publish-verification-results" link in the links associated with the pact
Publishes the result to the " pb : publish - verification - results " link in the links associated with the pact
pub fn publish_verification_results(links: Vec<Link>, broker_url: String, auth: Option<HttpAuth>, result: TestResult, version: String, build_url: Option<String>)
  -> impl Future<Item = (), Error = PactBrokerError> {
  let publish_link = links.iter().cloned().find(|item| item.name.to_ascii_lowercase() == "pb:publish-verification-results")
    .ok_or(PactBrokerError::LinkError("Response from the pact broker has no 'pb:publish-verification-results' link".into()));
  future::done(publish_link)
  .and_then(move |publish_link| {
    let json = build_payload(result, version, build_url);
    let hal_client = HALClient::with_url(broker_url.clone(), auth.clone());
    hal_client.post_json(publish_link.href.clone().unwrap(), json.to_string())
  })
}
pub fn publish_verification_results ( links : Vec < Link > , broker_url : String , auth : Option < HttpAuth > , result : TestResult , version : String , build_url : Option < String > ) -> impl Future < Item = ( ) , Error = PactBrokerError > { let publish_link = links . iter ( ) . cloned ( ) . find ( | item | item . name . to_ascii_lowercase ( ) == " " ) . ok_or ( PactBrokerError :: LinkError ( " " . into ( ) ) ) ; future :: done ( publish_link ) . and_then ( move | publish_link | { let json = build_payload ( result , version , build_url ) ; let hal_client = HALClient :: with_url ( broker_url . clone ( ) , auth . clone ( ) ) ; hal_client . post_json ( publish_link . href . clone ( ) . unwrap ( ) , json . to_string ( ) ) } ) }
Publishes the result to the "pb:publish-verification-results" link in the links associated with the pact
Publishes the result to the " pb : publish - verification - results " link in the links associated with the pact
links
Vec<Link>
broker_url
String
auth
Option<HttpAuth>
result
TestResult
version
String
build_url
Option<String>
links
Vec<Link>
broker_url
String
auth
Option<HttpAuth>
result
TestResult
version
String
build_url
Option<String>