File tree Expand file tree Collapse file tree
src/cloudflare/resources/kv/namespaces Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ def update(
110110 raise ValueError (f"Expected a non-empty value for `namespace_id` but received { namespace_id !r} " )
111111 if not key_name :
112112 raise ValueError (f"Expected a non-empty value for `key_name` but received { key_name !r} " )
113+ # It should be noted that the actual Content-Type header that will be
114+ # sent to the server will contain a `boundary` parameter, e.g.
115+ # multipart/form-data; boundary=---abc--
116+ extra_headers = {"Content-Type" : "multipart/form-data" , ** (extra_headers or {})}
113117 return self ._put (
114118 f"/accounts/{ account_id } /storage/kv/namespaces/{ namespace_id } /values/{ key_name } " ,
115119 body = maybe_transform (
@@ -318,6 +322,10 @@ async def update(
318322 raise ValueError (f"Expected a non-empty value for `namespace_id` but received { namespace_id !r} " )
319323 if not key_name :
320324 raise ValueError (f"Expected a non-empty value for `key_name` but received { key_name !r} " )
325+ # It should be noted that the actual Content-Type header that will be
326+ # sent to the server will contain a `boundary` parameter, e.g.
327+ # multipart/form-data; boundary=---abc--
328+ extra_headers = {"Content-Type" : "multipart/form-data" , ** (extra_headers or {})}
321329 return await self ._put (
322330 f"/accounts/{ account_id } /storage/kv/namespaces/{ namespace_id } /values/{ key_name } " ,
323331 body = await async_maybe_transform (
You can’t perform that action at this time.
0 commit comments