Commit 57cc1ad
authored
Add raise_for_status parameter to Session and AsyncSession (#651)
* Add raise_for_status parameter to Session and AsyncSession
- Add raise_for_status parameter (default: False) to both Session and AsyncSession
- Automatically raises HTTPError for 4xx/5xx status codes when enabled
- Similar to aiohttp's raise_for_status parameter
- Add 4 unit tests (2 sync, 2 async) to verify functionality
- Maintains 100% backward compatibility with default False value
* Fix linting: break long docstring lines to <= 88 chars
* Fix linting: line length and assert statements1 parent e366cb3 commit 57cc1ad
File tree
3 files changed
+57
-0
lines changed- curl_cffi/requests
- tests/unittest
3 files changed
+57
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| 389 | + | |
| 390 | + | |
386 | 391 | | |
387 | 392 | | |
388 | 393 | | |
| |||
628 | 633 | | |
629 | 634 | | |
630 | 635 | | |
| 636 | + | |
| 637 | + | |
631 | 638 | | |
632 | 639 | | |
633 | 640 | | |
| |||
653 | 660 | | |
654 | 661 | | |
655 | 662 | | |
| 663 | + | |
| 664 | + | |
656 | 665 | | |
657 | 666 | | |
658 | 667 | | |
| |||
730 | 739 | | |
731 | 740 | | |
732 | 741 | | |
| 742 | + | |
| 743 | + | |
733 | 744 | | |
734 | 745 | | |
735 | 746 | | |
| |||
1066 | 1077 | | |
1067 | 1078 | | |
1068 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
1069 | 1082 | | |
1070 | 1083 | | |
1071 | 1084 | | |
| |||
1083 | 1096 | | |
1084 | 1097 | | |
1085 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
1086 | 1101 | | |
1087 | 1102 | | |
1088 | 1103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
0 commit comments