BatchScoring/RestRequest.cs
/// <summary>
/// Start an experiment and get the results.
/// </summary>
/// <typeparam name="T">Type of object to retrieve</typeparam>
/// <param name="requestInfo">Info for retrieving one or many run results</param>
/// <param name="authToken">AAD Token for SP</param>
/// <param name="payload">Job start body - {"ExperimentName" : "NAME"} </param>
/// <returns>Results of the call as a T or null on failure. </returns>
Start an experiment and get the results.
Start an experiment and get the results .
public static T StartBatchJob<T>(PipelineRequest requestInfo, string authToken, string payload) where T : class, new()
        {
            RestResponse rr = RestRequest.MakeRequest(requestInfo, authToken, payload, "application/json").Result;
            if (rr.Content != null && rr.Content.Length > 0)
            {
                return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(rr.Content);
            }
            return null;
        }
public static T StartBatchJob < T > ( PipelineRequest requestInfo , string authToken , string payload ) where T : class , new ( ) { RestResponse rr = RestRequest . MakeRequest ( requestInfo , authToken , payload , " " ) . Result ; if ( rr . Content != null && rr . Content . Length > 0 ) { return Newtonsoft . Json . JsonConvert . DeserializeObject < T > ( rr . Content ) ; } return null ; }
Start an experiment and get the results.
Start an experiment and get the results .
Results of the call as a T or null on failure.
Results of the call as a T or null on failure .
requestInfo
PipelineRequest
Info for retrieving one or many run results
Info for retrieving one or many run results
authToken
string
AAD Token for SP
AAD Token for SP
payload
string
Job start body - {"ExperimentName" : "NAME"}
Job start body - { " ExperimentName " : " NAME " }
typeparam
Type of object to retrieve
Type of object to retrieve