コード例 #1
0
ファイル: HeadersSet.cs プロジェクト: progstr/progstr-dotnet
        public void DisableCompression()
        {
            this.settings["progstr.api.enablecompression"] = "false";
            var client = new TestClient(this.settings);
            client.ConfigureRequest(null);

            var headers = this.NormalizeLineEndings(client.Headers);
            headers.ShouldBe(this.NormalizeLineEndings(@"Accept: application/json
            Content-Type: application/json; charset=utf-8
            User-Agent: progstr-dotnet 1.0
            X-Progstr-Token: 7cf122aa-6df5-4fba-a5b3-f6f0a54e7b01
            "));
        }
コード例 #2
0
ファイル: HeadersSet.cs プロジェクト: progstr/progstr-dotnet
        public void DefaultToCompression()
        {
            //throw new InvalidOperationException(this.settings["progstr.log.apitoken"]);
            var client = new TestClient(this.settings);
            client.ConfigureRequest(null);

            var headers = this.NormalizeLineEndings(client.Headers);
            headers.ShouldBe(this.NormalizeLineEndings(@"Accept: application/json
            Content-Type: application/json; charset=utf-8
            Content-Encoding: gzip
            User-Agent: progstr-dotnet 1.0
            X-Progstr-Token: 7cf122aa-6df5-4fba-a5b3-f6f0a54e7b01
            "));
        }