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

Removed invalid service invocation check when using HttpRequestMessage #1354

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/Dapr.Client/DaprClientGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,7 @@ public override HttpRequestMessage CreateInvokeMethodRequest<TRequest>(HttpMetho
public override async Task<HttpResponseMessage> InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken = default)
{
ArgumentVerifier.ThrowIfNull(request, nameof(request));

if (!this.httpEndpoint.IsBaseOf(request.RequestUri))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is intentional. The HttpRequestMessage (from the DaprClient docs) "must be a conforming Dapr service invocation request". This implies that the base RequestUri would be the Dapr sidecar host/port (as created by the CreateInvokeMethodRequest() method).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the life of me, I cannot remember my scenario for why I thought this was out of date. I'm good closing this until it comes to mind again.

{
throw new InvalidOperationException("The provided request URI is not a Dapr service invocation URI.");
}


// Note: we intentionally DO NOT validate the status code here.
// This method allows you to 'invoke' without exceptions on non-2xx.
try
Expand Down
Loading