• Safely fetch and attempt to parse the responses json.

    Type Parameters

    • T

    Parameters

    • input: RequestInfo | URL
    • Optional init: RequestInit

    Returns TaskEither<ServerError | JsonError, T>

    Example

    import { safeFetchJson } from '@jvlk/fp-ts-fetch'

    safeFetchJson('api.com')() // => Either<Error, T>

    Since

    1.1.0