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.
When trying to retrieve the value of a key–value pair using the
Cloudflare\API\Endpoints\WorkersKV::getAllKeysAndValuesForNamespacemethod, the SDK throws aJSONExceptionbecause 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 returnapplication/jsonas theContent-Type.The API either needs to return an appropriate content type for responses, or the SDK needs to accommodate plain text responses like this.