You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
joshfree
added
Azure.Core.V2
Contains issues to consider when desiging Azure Core V2
and removed
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
labels
Mar 11, 2025
'defaultPipeline' is not the right name - it is the httpPipeline
get rid of the 'getPipeline' method - just use the final field directly.
Don't create a 'String host' if the value is only used in one place - just put it directly into that place.
Chain the 'create HTTP request' calls, to reduce the number of 'httpRequest.getHeaders().' calls, e.g. rather than this:
// Create the HTTP request
HttpRequest httpRequest = new HttpRequest().setMethod(HttpMethod.POST).setUri(host);
httpRequest.getHeaders().add(HttpHeaderName.CONTENT_LENGTH, String.valueOf(contentLength));
httpRequest.getHeaders().add(HttpHeaderName.CONTENT_TYPE, contentType);
Can you generate this:
// Create the HTTP request
HttpRequest httpRequest = new HttpRequest()
Remember to add in whitespace lines before the various // comments - let's make the generated code pretty
Line 94 seems unnecessary:
BinaryData binaryData = (BinaryData) data;
(where data is already BinaryData)The text was updated successfully, but these errors were encountered: