azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[BUG] Unable to use Multipart Form data content types with Azure Core functionalities.

Open maichuin opened this issue 1 year ago • 2 comments
trafficstars

Library name and version

Azure.Core

Describe the bug

Here MultiPartFormDataContent is internal class but generally we use MultiPartFromDataContent which comes from System.Net.Http is a public class. How can we utilize Azure's internal MultipartFormDataContent class in our APIs to create an API with multipart content type?

Expected behavior

MultiPartFormDataContent should be public class right?

Actual behavior

Unable to get the instance of the class from the Azure.Core namespace

Reproduction Steps

Create a sample application and try to create likedata =new Azure.Core.MultipartFormDataContent()

Environment

No response

maichuin avatar Jun 27 '24 17:06 maichuin

Hi @maichuin. Thanks for reaching out and we regret that you're experiencing difficulties. The visibility for MultiPartFormDataContent is intentional; the type is not a full implementation and makes assumptions based on Azure service patterns. It is intended to be used internally by Azure SDK packages for specific services and is not part of their public API. At this time, we do not have plans to make this public nor extend the type to fully conform to the HTTP spec.

It is recommended that you use the official .NET implementation, System.Net.Http.MultiPartFormDataContent as you have already noted.

jsquire avatar Jun 27 '24 20:06 jsquire

Hi @maichuin. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

github-actions[bot] avatar Jun 27 '24 20:06 github-actions[bot]

Hi @maichuin, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

github-actions[bot] avatar Jul 04 '24 22:07 github-actions[bot]