Skip to content

Commit

Permalink
- fixes ordering of request adapter set in multipart
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Jul 24, 2023
1 parent fbb5dca commit c4d2dd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RequestInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ public void SetContentFromParsable<T>(IRequestAdapter requestAdapter, string con
using var activity = _activitySource?.StartActivity(nameof(SetContentFromParsable));
using var writer = GetSerializationWriter(requestAdapter, contentType, item);
SetRequestType(item, activity);
writer.WriteObjectValue(null, item);
if(item is MultipartBody mpBody)
{
contentType += "; boundary=" + mpBody.Boundary;
mpBody.RequestAdapter = requestAdapter;
}
writer.WriteObjectValue(null, item);
Headers.Add(ContentTypeHeader, contentType);
Content = writer.GetSerializedContent();
}
Expand Down

0 comments on commit c4d2dd2

Please sign in to comment.