Comments (6)
HttpRequest requires a mimeType
argument be passed when setting the request body, but this is likely to come from the @Headers
annotation. Will work around it for now but we'll probably want to coalesce on a standard method for handling this.
It may be desirable to take certain standard headers and give them their own required annotations so we can ensure that a service interface method is well-formed more easily.
from autorest-clientruntime-for-java.
We will want to make a design/philosophical decision about whether an HttpRequest object can be expected to be fully formed, and not need to have default values placed for missing required headers by the time RestProxy passes it to HttpClient.sendRequestAsync.
from autorest-clientruntime-for-java.
I'm also wondering if the use of InputStream is going to force us to use blocking file I/O and how that should affect the design. I think these questions might get hashed out at the time @jianghaolu is able to pull his netty adapter into the runtime.
from autorest-clientruntime-for-java.
I'm just getting to look at this, and I'm not sure that I like the idea of exposing our HttpRequest and/or HttpRequestBody classes outside of our internals. I feel that if our current annotations/annotation processing is lacking somewhere (streaming) then we should fix it there, rather than breaking our abstractions by exposing our internal data structures.
I thought that the only streaming scenario we were able to think of was streaming a file, which we already had a verbal solution for (pass in a File object and RestProxy would start streaming the file's contents as well as set the proper MIME type). Is there another scenario that has come up?
from autorest-clientruntime-for-java.
I think you’re right, although outside of this case HttpClient stuff will probably leak out of the runtime in contexts like user-defined RequestPolicies.
The file use case, which should probably be all we do for streaming until more scenarios come up, would probably be best addressed by something like what you’re describing—maybe a file path or stream, offset and length, which does whatever observable byte buffer pooling fancy thing inside. Thanks for the reminder.
from autorest-clientruntime-for-java.
This is pretty much addressed by #257
from autorest-clientruntime-for-java.
Related Issues (20)
- Missing Thread#sleep call in the ExponentialBackoffRetryStrategy implementation? HOT 1
- Dependency Upgrade to fix CVE Vulnerabilities
- [BUG] FlatteningSerializer breaks "." in key of template json HOT 1
- Support for multi-tenant authentication
- Missing domain for Servicebus
- Replacing Adal4j with Msal4j HOT 1
- [Feature-Request] Support Service Principal with Cert in AzureCliCredential
- [Feature-Request] Support customized Azure Environment in AzureCliCredential
- Dependency vulnerabilities
- Add timeout to ApplicationTokenCredentials.getToken() HOT 1
- Illegal reflective access by com.microsoft.rest.Validator HOT 2
- okhttp dependency issu: java.lang.NoSuchMethodError: okhttp3.Cookie.toString(Z)Ljava/lang/String; HOT 2
- azure-client-authentication using msal4j HOT 2
- AzureCliToken isMRRT flag is not updated correctly on token clone HOT 2
- Deserialization fails for com.microsoft.azure.ExpressionEvaluationDetails class
- Validator Attempts to Reflectively Access Internal JDK APIs HOT 4
- Upgrade com.squareup.okhttp3:okhttp libraries to >= 4.9.2 due to critical security vulnerability HOT 2
- This repo is missing important files
- Deserialization failure of CloudError HOT 1
- NullPointerException on ServiceFuture.cancel()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorest-clientruntime-for-java.