Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .NET Interactive #1950

Open
Oblomoff opened this issue Jan 28, 2025 · 0 comments
Open

Support for .NET Interactive #1950

Oblomoff opened this issue Jan 28, 2025 · 0 comments

Comments

@Oblomoff
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant