Skip to content

SDK is broken: trying to get KV value throws exception #152

@martinbean

Description

@martinbean

When trying to retrieve the value of a key–value pair using the Cloudflare\API\Endpoints\WorkersKV::getAllKeysAndValuesForNamespace method, the SDK throws a JSONException because the response of that call (https://api.cloudflare.com/#workers-kv-namespace-read-key-value-pair) is just plain text, and not JSON as the SDK is naïvely assuming all responses are. However, the API does return application/json as the Content-Type.

The API either needs to return an appropriate content type for responses, or the SDK needs to accommodate plain text responses like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions