Skip to content
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

Support batch multiPart requests and responses #14275

Merged
merged 17 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,18 @@ public static partial class Names
{
public static string Accept { get { throw null; } }
public static string Authorization { get { throw null; } }
public static string ContentDisposition { get { throw null; } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @KrzysztofCwalina we are adding more header names.

public static string ContentLength { get { throw null; } }
public static string ContentType { get { throw null; } }
public static string Date { get { throw null; } }
public static string ETag { get { throw null; } }
public static string Host { get { throw null; } }
public static string IfMatch { get { throw null; } }
public static string IfModifiedSince { get { throw null; } }
public static string IfNoneMatch { get { throw null; } }
public static string IfUnmodifiedSince { get { throw null; } }
public static string Range { get { throw null; } }
public static string Referer { get { throw null; } }
public static string UserAgent { get { throw null; } }
public static string XMsDate { get { throw null; } }
public static string XMsRange { get { throw null; } }
Expand Down
14 changes: 12 additions & 2 deletions sdk/core/Azure.Core/src/HttpHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,19 @@ public static class Names
/// Returns. <code>"If-Unmodified-Since"</code>
/// </summary>
public static string IfUnmodifiedSince => "If-Unmodified-Since";
/// <summary>
/// Returns. <code>"Referer"</code>
/// </summary>
public static string Referer => "Referer";
/// <summary>
/// Returns. <code>"Host"</code>
/// </summary>
public static string Host => "Host";

internal static string Referer => "Referer";
internal static string Host => "Host";
/// <summary>
/// Returns <code>"Content-Disposition"</code>
/// </summary>
public static string ContentDisposition => "Content-Disposition";
}

#pragma warning disable CA1034 // Nested types should not be visible
Expand Down
4 changes: 3 additions & 1 deletion sdk/core/Azure.Core/src/RequestContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Threading.Tasks;
using System.Threading;
using System.Buffers;
using System.Collections.Generic;
christothes marked this conversation as resolved.
Show resolved Hide resolved

namespace Azure.Core
{
Expand Down Expand Up @@ -105,7 +106,8 @@ public override void WriteTo(Stream stream, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
var read = _stream.Read(buffer, 0, buffer.Length);
if (read == 0) { break; }
if (read == 0)
christothes marked this conversation as resolved.
Show resolved Hide resolved
{ break; }
cancellationToken.ThrowIfCancellationRequested();
stream.Write(buffer, 0, read);
}
Expand Down
Loading