Skip to content

C# - RpcAsync called with HttpKey+Payload does not execute as a POST request #26

@novabyte

Description

@novabyte

As a workaround its possible to add the attached extension method to the IClient type which will enable usage which looks like:

var payload = new Dictionary<string, string>
{
    {"foo", "bar"}
};
try
{
    var rpcResponse = await _client.RpcAsyncPost(HttpKey, RpcId, payload.ToJson());
    Debug.LogFormat("rpcResponse: {0}", rpcResponse);
}
catch (ApiResponseException e)
{
    Debug.LogException(e);
}

A proper fix should be implemented in the code generator for the client sdk to handle this special case logic.

RpcHttpKeyExtensions.cs.txt

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions