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
feat: support returning the built HttpRequestMessage without sending (#2235)
* feat: support returning the built HttpRequestMessage without sending
- Add a return-type-driven build-only shape: a method declared
Task<HttpRequestMessage> builds the full request (URL, headers,
body/multipart content) and returns it to the caller instead of
dispatching it (Retrofit's Call.request()).
- Emit the build-and-return path in the source generator and add the
RequestMessage case to the shared return-type classifiers so it is
inline-eligible and the RF006 analyzer agrees.
- Add the same case to the reflection request builder, building the
request without sending or disposing it.
- Keep both paths in parity: the async authorization token getter is a
dispatch-time step and is skipped when only building the request.
- The caller owns the returned request and its content (not disposed).
- Document the feature in the README and breaking-changes notes.
* test: cover request-message return-shape eligibility branches
- Add a classifier test that drives inline eligibility for a
Task<HttpRequestMessage> return and a Task<T> of another result type,
exercising both outcomes of the request-message classification arm.
- Check the task result type directly in the classifier instead of
re-validating the already-matched task shape, dropping conditions no
caller could reach and keeping the generator and analyzer
classification paths in agreement.
0 commit comments