@@ -109,7 +109,7 @@ def __init__(
109109 super (InvokeMethodRequest , self ).__init__ (())
110110
111111 self ._content_type = content_type
112- self ._http_verb = None
112+ self ._http_verb : Optional [ str ] = None
113113 self ._http_querystring : Dict [str , str ] = {}
114114
115115 self .set_data (data )
@@ -127,7 +127,7 @@ def http_verb(self) -> Optional[str]:
127127 @http_verb .setter
128128 def http_verb (self , val : Optional [str ]) -> None :
129129 """Sets HTTP method to Dapr invocation request."""
130- if val not in self .HTTP_METHODS :
130+ if val is not None and val not in self .HTTP_METHODS :
131131 raise ValueError (f'{ val } is the invalid HTTP verb.' )
132132 self ._http_verb = val
133133
@@ -285,6 +285,7 @@ def __init__(
285285 data : Optional [Union [bytes , str ]] = None ,
286286 etag : Optional [str ] = None ,
287287 operation_type : TransactionOperationType = TransactionOperationType .upsert ,
288+ metadata : Optional [Dict [str , str ]] = None ,
288289 ):
289290 """Initializes TransactionalStateOperation item from
290291 :obj:`runtime_v1.TransactionalStateOperation`.
@@ -305,6 +306,7 @@ def __init__(
305306 self ._data = data # type: ignore
306307 self ._etag = etag
307308 self ._operation_type = operation_type
309+ self ._metadata = metadata
308310
309311 @property
310312 def key (self ) -> str :
@@ -326,6 +328,11 @@ def operation_type(self) -> TransactionOperationType:
326328 """Gets etag."""
327329 return self ._operation_type
328330
331+ @property
332+ def metadata (self ) -> Dict [str , str ]:
333+ """Gets metadata."""
334+ return {} if self ._metadata is None else self ._metadata
335+
329336
330337class EncryptRequestIterator (DaprRequest ):
331338 """An iterator for cryptography encrypt API requests.
0 commit comments