File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ class Request(BaseModel):
166166
167167 model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
168168
169- unique_key : Annotated [str , Field (alias = 'uniqueKey' )]
169+ unique_key : Annotated [str , Field (alias = 'uniqueKey' , frozen = True )]
170170 """A unique key identifying the request. Two requests with the same `unique_key` are considered as pointing
171171 to the same URL.
172172
@@ -178,17 +178,18 @@ class Request(BaseModel):
178178 and specify which URLs shall be considered equal.
179179 """
180180
181- url : Annotated [str , BeforeValidator (validate_http_url ), Field ()]
181+ url : Annotated [str , BeforeValidator (validate_http_url ), Field (frozen = True )]
182182 """The URL of the web page to crawl. Must be a valid HTTP or HTTPS URL, and may include query parameters
183183 and fragments."""
184184
185- method : HttpMethod = 'GET'
185+ method : Annotated [ HttpMethod , Field ( frozen = True )] = 'GET'
186186 """HTTP request method."""
187187
188188 payload : Annotated [
189189 HttpPayload | None ,
190190 BeforeValidator (lambda v : v .encode () if isinstance (v , str ) else v ),
191191 PlainSerializer (lambda v : v .decode () if isinstance (v , bytes ) else v ),
192+ Field (frozen = True ),
192193 ] = None
193194 """HTTP request payload."""
194195
You can’t perform that action at this time.
0 commit comments