# Couldn't pass payload via Unity Client with http\_key

**URL:** <https://forum.heroiclabs.com/t/couldnt-pass-payload-via-unity-client-with-http-key/516>\
**Category:** Game Design\
**Created:** [February 19, 2020, 7:15am UTC](https://forum.heroiclabs.com/t/couldnt-pass-payload-via-unity-client-with-http-key/516 "2020-02-19T07:15:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![opus\_kojiro](https://avatars.discourse-cdn.com/v4/letter/o/b487fb/32.png) [@opus\_kojiro](https://forum.heroiclabs.com/u/opus_kojiro)\
**Post date:** [February 20, 2020, 3:47am UTC](https://forum.heroiclabs.com/t/couldnt-pass-payload-via-unity-client-with-http-key/516/3 "2020-02-20T03:47:32Z")

</div>

I wonder it is nakama-dotnet’s issue.

In ApiClient.gen.cs  
RpcFunc2Async() send parameter as GET.  
But I couldn’t find the code reading payload parameter from query in go code.

Now I found a workaround of this issue by using HttpClient directly.  
The payload parameter is unwrapped in go code. So need to enclose in parentheses.

I think adding “unwrap” parameter is useful in this case.  
But I don’t know this is correct way…

Like this.

```
        var json = "\"{\\\"Val\\\": \\\"a\\\"}\""; // this is unwrapped to {\"Val\": \"a\"} in go 
        // var json = "{\"Val\": \"a\"}"; // unwrap version

        using (var httpClient = new HttpClient())
        {
            var content = new StringContent(json, Encoding.UTF8, "application/json");
            var accept = new MediaTypeWithQualityHeaderValue("application/json");
            httpClient.DefaultRequestHeaders.Accept.Add(accept);

            var response = await httpClient.PostAsync("http://127.0.0.1:7350/v2/rpc/test?http_key=key", content);
            // var response = await httpClient.PostAsync("http://127.0.0.1:7350/v2/rpc/test?http_key=key&unwrap=1", content); // unwrap version

            ...
        }
```

---

_[View the full topic](https://forum.heroiclabs.com/t/couldnt-pass-payload-via-unity-client-with-http-key/516)._
