@@ -306,6 +306,20 @@ public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodN
306306 return CreateInvokeMethodRequest ( HttpMethod . Post , appId , methodName ) ;
307307 }
308308
309+ /// <summary>
310+ /// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
311+ /// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
312+ /// with the <c>POST</c> HTTP method.
313+ /// </summary>
314+ /// <param name="appId">The Dapr application id to invoke the method on.</param>
315+ /// <param name="methodName">The name of the method to invoke.</param>
316+ /// <param name="queryStringParameters">A collection of key/value pairs to populate the query string from.</param>
317+ /// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
318+ public HttpRequestMessage CreateInvokeMethodRequest ( string appId , string methodName , IReadOnlyCollection < KeyValuePair < string , string > > queryStringParameters )
319+ {
320+ return CreateInvokeMethodRequest ( HttpMethod . Post , appId , methodName , queryStringParameters ) ;
321+ }
322+
309323 /// <summary>
310324 /// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
311325 /// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
@@ -317,6 +331,19 @@ public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodN
317331 /// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
318332 public abstract HttpRequestMessage CreateInvokeMethodRequest ( HttpMethod httpMethod , string appId , string methodName ) ;
319333
334+ /// <summary>
335+ /// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
336+ /// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
337+ /// with the HTTP method specified by <paramref name="httpMethod" />.
338+ /// </summary>
339+ /// <param name="httpMethod">The <see cref="HttpMethod" /> to use for the invocation request.</param>
340+ /// <param name="appId">The Dapr application id to invoke the method on.</param>
341+ /// <param name="methodName">The name of the method to invoke.</param>
342+ /// <param name="queryStringParameters">A collection of key/value pairs to populate the query string from.</param>
343+ /// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
344+ public abstract HttpRequestMessage CreateInvokeMethodRequest ( HttpMethod httpMethod , string appId ,
345+ string methodName , IReadOnlyCollection < KeyValuePair < string , string > > queryStringParameters ) ;
346+
320347 /// <summary>
321348 /// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
322349 /// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
@@ -329,9 +356,9 @@ public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodN
329356 /// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
330357 public HttpRequestMessage CreateInvokeMethodRequest < TRequest > ( string appId , string methodName , TRequest data )
331358 {
332- return CreateInvokeMethodRequest < TRequest > ( HttpMethod . Post , appId , methodName , data ) ;
359+ return CreateInvokeMethodRequest ( HttpMethod . Post , appId , methodName , new List < KeyValuePair < string , string > > ( ) , data ) ;
333360 }
334-
361+
335362 /// <summary>
336363 /// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
337364 /// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
@@ -343,9 +370,10 @@ public HttpRequestMessage CreateInvokeMethodRequest<TRequest>(string appId, stri
343370 /// <param name="appId">The Dapr application id to invoke the method on.</param>
344371 /// <param name="methodName">The name of the method to invoke.</param>
345372 /// <param name="data">The data that will be JSON serialized and provided as the request body.</param>
373+ /// <param name="queryStringParameters">A collection of key/value pairs to populate the query string from.</param>
346374 /// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
347- public abstract HttpRequestMessage CreateInvokeMethodRequest < TRequest > ( HttpMethod httpMethod , string appId , string methodName , TRequest data ) ;
348-
375+ public abstract HttpRequestMessage CreateInvokeMethodRequest < TRequest > ( HttpMethod httpMethod , string appId , string methodName , IReadOnlyCollection < KeyValuePair < string , string > > queryStringParameters , TRequest data ) ;
376+
349377 /// <summary>
350378 /// Perform health-check of Dapr sidecar. Return 'true' if sidecar is healthy. Otherwise 'false'.
351379 /// CheckHealthAsync handle <see cref="HttpRequestException"/> and will return 'false' if error will occur on transport level
@@ -526,7 +554,7 @@ public Task InvokeMethodAsync<TRequest>(
526554 TRequest data ,
527555 CancellationToken cancellationToken = default )
528556 {
529- var request = CreateInvokeMethodRequest < TRequest > ( httpMethod , appId , methodName , data ) ;
557+ var request = CreateInvokeMethodRequest < TRequest > ( httpMethod , appId , methodName , new List < KeyValuePair < string , string > > ( ) , data ) ;
530558 return InvokeMethodAsync ( request , cancellationToken ) ;
531559 }
532560
@@ -620,7 +648,7 @@ public Task<TResponse> InvokeMethodAsync<TRequest, TResponse>(
620648 TRequest data ,
621649 CancellationToken cancellationToken = default )
622650 {
623- var request = CreateInvokeMethodRequest < TRequest > ( httpMethod , appId , methodName , data ) ;
651+ var request = CreateInvokeMethodRequest < TRequest > ( httpMethod , appId , methodName , new List < KeyValuePair < string , string > > ( ) , data ) ;
624652 return InvokeMethodAsync < TResponse > ( request , cancellationToken ) ;
625653 }
626654
0 commit comments