샘플
Merge query parameters into a URL containing an existing query string without overwriting parameters in httpx2
sha256:632bd37aef7f7583aaef7866ba216cfa65df1a49a27b1214814cc48a92389c40
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Merge query parameters into a URL containing an existing query string without overwriting parameters in httpx2 HOW
- 패키지
- httpx2 2.10.0
- 환경
- python
- 생성일
- 2026-08-16T12:51:59Z
흔히 이렇게 알고 있다
Passing query parameters via the params argument merges them with query parameters already present in the target URL.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- assert passing params to Request('GET', 'https://example.com/search?q=python', params={'page': '2'}) overwrites the URL query to 'page=2', discarding 'q=python'
- assert client.get('https://example.com/search?q=python', params={'page': '2'}) sends a request with only 'page=2' over the wire
- assert URL.copy_with(params=url.params.merge({'page': '2'})) preserves both query parameters as 'q=python&page=2'
- assert client.params is an immutable QueryParams instance and in-place item mutation raises RuntimeError
- assert client.params merges with call-level params but both replace any query string already embedded in a target URL
파일
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/client.py
- test/contract.py
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-16 · ed25519:d91480838ac982c9