refit icon indicating copy to clipboard operation
refit copied to clipboard

Support for .NET Interactive

Open Oblomoff opened this issue 1 year ago • 0 comments

Refit can't generate a proxy class in .NET Interactive, but it should.

#r "nuget: Refit, *"
#r "nuget: Refit.HttpClientFactory, *"

using Refit;

public record User();

public interface IGitHubApi
{
    [Get("/users/{user}")]
    Task<User> GetUser(string user);
}

RestService.For<IGitHubApi>("https://api.github.com");
Error: System.InvalidOperationException: IGitHubApi doesn't look like a Refit interface.
Make sure it has at least one method with a Refit HTTP method attribute and Refit is installed in the project.

Oblomoff avatar Jan 28 '25 19:01 Oblomoff