Skip to content

Write examples that expose the API using async/REST #40

Description

@tonyx

In general the api are exposed as direct call whereas you may rather prefer asynchronous calls and eventually publish rest api.

Asyncrounous call can be easily accesed by C# using await if they have wrappers like like:

exposed function

let call () =
    result {
        let! ...
        return ()
}

async wrapper:

let anyCallAsync () =
    task {
        return call ()
}

Also TaskResult (fsToolkit) will be the union of the two approaches:

let callAsync () =
    taskResult {
    let! ...
       return ()
}

Any C# client can handle it by using 'await' and then querying for .IsOk or .IsError using if/case/switch/pattern matching.
user sharpinoBlazor
as an inspiration to produce other kind of integrations with any technology eventually adding a REST layer.
Regarding to Blazor: produce a webassembly example.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions