Beispiel #1
0
        public void WhenIHitMakeCodeEndpoint()
        {
            try
            {
                string accessToken = AssetServiceConfig.GetValidUserAccessToken();

                //   public static string DoHttpRequest(string resourceUri, string httpMethod,
                //string mediaType, string payloadData, HttpStatusCode httpResponseCode)
                ResponseString = RestClientUtil.DoHttpRequestWithNoBody(AssetServiceConfig.MakeCodeEndpoint, HeaderSettings.GetMethod, accessToken,
                                                                        HeaderSettings.JsonMediaType, HttpStatusCode.OK);

                //DoHttpRequestWithNoBody(string resourceUri, string httpMethod, string authKey, string mediaType, HttpStatusCode httpResponseCode, string authKeyType = null,
                //                                               string contentType = null, Dictionary<string, string> customHeaders = null)
                MakeCodeAPIResponse = JsonConvert.DeserializeObject <List <MakeCodeResponse> >(ResponseString);
            }
            catch (Exception e)
            {
                throw new Exception("Unable To Perform Get MakeCode", e);
            }
        }