azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[BUG] Unable to use Multipart Form data content types with Azure Core functionalities.
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
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.
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.
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.