Esempio n. 1
0
        public void TestExtractCanonicalHeaders()
        {
            HttpRequestMessage request = new HttpRequestMessage();

            request.Headers.Add("X-Amz-Date", "20150830T123600Z");
            request.Headers.Add("Host", "iam.amazonaws.com");

            string result = awsSignerHelperUnderTest.ExtractCanonicalHeaders(request);

            Assert.Equal("host:iam.amazonaws.com\n" +
                         "x-amz-date:20150830T123600Z\n", result);
        }
        public void TestExtractCanonicalHeaders()
        {
            IRestRequest request = new RestRequest();

            request.AddHeader("X-Amz-Date", "20150830T123600Z");
            request.AddHeader("Host", "iam.amazonaws.com");
            request.AddHeader("Content-Type", JsonMediaType);

            string result = awsSignerHelperUnderTest.ExtractCanonicalHeaders(request);

            Assert.Equal("content-type:application/json; charset=utf-8\nhost:iam.amazonaws.com\n" +
                         "x-amz-date:20150830T123600Z\n", result);
        }