Skip to content

Support for .NET InteractiveΒ #1950

@Oblomoff

Description

@Oblomoff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions