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 sending multipart/form-data in RestProxy #8702

Closed
jianghaolu opened this issue Mar 4, 2020 · 6 comments
Closed

Support sending multipart/form-data in RestProxy #8702

jianghaolu opened this issue Mar 4, 2020 · 6 comments
Assignees
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Milestone

Comments

@jianghaolu
Copy link
Contributor

  • Add a @PartParam and parse it in SwaggerMethodParser
  • Send multipart/form-data in RestProxy
@jianghaolu jianghaolu added Client This issue points to a problem in the data-plane of the library. ARM - Core labels Mar 4, 2020
@jianghaolu jianghaolu added Azure.Core azure-core and removed ARM - Core labels Mar 4, 2020
@alzimmermsft alzimmermsft self-assigned this Mar 17, 2020
@alzimmermsft
Copy link
Member

@jianghaolu do you have any specific service scenarios this could be tested against to verify correctness?

@jianghaolu
Copy link
Contributor Author

@alzimmermsft alzimmermsft added the feature-request This issue requires a new behavior in the product in order be resolved. label Feb 19, 2021
@alzimmermsft alzimmermsft added this to the [2021] May milestone Mar 8, 2021
@alzimmermsft
Copy link
Member

alzimmermsft commented Mar 8, 2021

The implementation of multipart/form-data should follow the specification laid out in RFC 7578. Based on initial review of the specification the following is known:

Option Name Required Default (if not required) Explanation
Name Yes N/A Name of the form field, configures name in the part Content-Disposition header
Filename No None Name of a file included in the form, configures filename in the part Content-Disposition header
ContentType No text/plain The Content-Type of the part, if the part is a file this will default to application/octet-stream

Depending on the usage of multipart/form-data new wrapper types may need to be created as all values above can be determined at runtime.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Oct 8, 2022

loadtesting uses multipart, and they plan a GA soon (expect Nov.)
#30706

At present they uses a helper method to use setHeader and setBody to provide a solution (the case when streaming is not necessary?).
https://github.com/Azure/azure-sdk-for-java/pull/30706/files#diff-5b7425837268825f2f8d2712d0ce73ade89309dc7ec407d2c9a45708525af0f9
And provide a hand-written method in Client to use this helper.

Let us know your opinion of this solution.

@weidongxu-microsoft
Copy link
Member

We may need an update on it. OpenAI would use multipart/form-data in mid Sept. for transcription from video to text

Copy link

Hi @jianghaolu, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Projects
Status: Done
Development

No branches or pull requests

4 participants