-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Support batch multiPart requests and responses #14275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
christothes
merged 17 commits into
Azure:master
from
christothes:users/chriss/tablesBatch
Aug 21, 2020
Merged
Changes from 7 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
bba5269
wip
christothes d5ca342
wip
christothes e8404eb
Merge remote-tracking branch 'upstream/master' into users/chriss/tabl…
christothes 1608966
Merge remote-tracking branch 'upstream/master' into users/chriss/tabl…
christothes 9f1f812
support batch multiPart requests and responses
christothes e8ff4c7
remove RequestContent.Headers
christothes e549945
remove test mode
christothes d3db09d
remove HashCodeCombiner
christothes cc35ee6
remove StringSegment and StringTokenizer
christothes 72ca094
Multipart subdir in shared, remove more types
christothes 8e0baf9
remove consts and error classes
christothes 673a384
explicit line breaks in SendMultipartData test
christothes 459678f
pr comments
christothes b9cab18
multipart tests
christothes 270a699
merge
christothes 6ed40a1
refactor tests
christothes ee3fe61
export core
christothes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Azure.Core | ||
| { | ||
| /// <summary> | ||
| /// Constants used by the batching APIs. | ||
| /// </summary> | ||
| internal static class BatchConstants | ||
christothes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| public const int KB = 1024; | ||
| public const int NoStatusCode = 0; | ||
| public const int RequestBufferSize = KB; | ||
| public const int ResponseLineSize = 4 * KB; | ||
| public const int ResponseBufferSize = 16 * KB; | ||
|
|
||
| public const string XmsVersionName = "x-ms-version"; | ||
| public const string XmsClientRequestIdName = "x-ms-client-request-id"; | ||
| public const string XmsReturnClientRequestIdName = "x-ms-return-client-request-id"; | ||
| public const string ContentIdName = "Content-ID"; | ||
| public const string ContentLengthName = "Content-Length"; | ||
|
|
||
| public const string MultipartContentTypePrefix = "multipart/mixed; boundary="; | ||
| public const string RequestContentType = "Content-Type: application/http"; | ||
| public const string RequestContentTransferEncoding = "Content-Transfer-Encoding: binary"; | ||
| public const string BatchSeparator = "--"; | ||
| public const string HttpVersion = "HTTP/1.1"; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
| using Azure.Core.Pipeline; | ||
|
|
||
| namespace Azure.Core | ||
| { | ||
| /// <summary> | ||
| /// Errors raised by the batching APIs. | ||
| /// </summary> | ||
| internal static class BatchErrors | ||
christothes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| public static InvalidOperationException InvalidBatchContentType(string contentType) => | ||
| new InvalidOperationException($"Expected {HttpHeader.Names.ContentType} to start with {BatchConstants.MultipartContentTypePrefix} but received {contentType}"); | ||
|
|
||
| public static InvalidOperationException InvalidHttpStatusLine(string statusLine) => | ||
| new InvalidOperationException($"Expected an HTTP status line, not {statusLine}"); | ||
|
|
||
| public static InvalidOperationException InvalidHttpHeaderLine(string headerLine) => | ||
| new InvalidOperationException($"Expected an HTTP header line, not {headerLine}"); | ||
|
|
||
| public static RequestFailedException InvalidResponse(ClientDiagnostics clientDiagnostics, Response response, Exception innerException) => | ||
| clientDiagnostics.CreateRequestFailedExceptionWithContent(response, message: "Invalid response", innerException: innerException); | ||
|
|
||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.