Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
272 stars 54 forks source link

Out of date C# client usage example? #231

Open Numpsy opened 3 years ago

Numpsy commented 3 years ago

Hi,

I've been having a go at dropping a simple remoting client into an existing C# service (as an experiment in something that currently uses NSwag/REST clients).

When I tried to add the proxy calls as described in https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/documentation/src/dotnet-csharp.md, e.g.

var proxy = Proxy.CreateFromBuilder<IServer>((typeName, funcName) => {
                return $"http://localhost:8080/api/{typeName}/{funcName}";
            });

It fails to build because CreateFromBuilder also requires an isBinarySerialization parameter

https://github.com/Zaid-Ajaj/Fable.Remoting/blob/d8133b551ee6f4d8a356b83afb4790c8d7f8ba05/Fable.Remoting.DotnetClient/Proxy.fs#L132

I believe that isBinarySerialization relates to the support for MessagePack responses, so maybe the documentation is a little out of date with regards to that feature?

Zaid-Ajaj commented 3 years ago

Hi @Numpsy thanks for pointing it out, yeah the docs are a bit outdated in this case. I kinda hoped we could solve it by making isBinarySerialization an optional parameter but it is a module function :/