15 Commits

Author SHA1 Message Date
Earlopain
a4b95db01c Fix webmock integration when posting tempfiles
The fix is two-fold and also allows them to be retryable

Closes https://gitlab.com/os85/httpx/-/issues/320
2024-11-06 13:27:45 +00:00
HoneyryderChuck
3e504fb511 fix for webmock request body expecting a string
when building the request signature, the body is preemptively converted to a string, which fulfills the expectation for webmock, despite it being a bit of a perf penalty if the request contains a multipart request body, as the body will be fully read to memory

Closes #319

Closes https://github.com/HoneyryderChuck/httpx/issues/65
2024-10-31 17:47:12 +00:00
Alexey Romanov
4a966d4cb8 Add a regression test for WebMock with form/multipart 2024-10-25 13:43:12 +01:00
HoneyryderChuck
97c44a37ae added webmock test for plain-text response with content-encoding headerr 2023-12-05 19:41:49 +00:00
HoneyryderChuck
79756e4ac4 small cleanup in type definitions and webmock testing 2023-11-22 11:07:54 +00:00
HoneyryderChuck
b0dfe68ebe stream plugin: do not cache intermediate responses
this had the effect of storing redirect responses and using them solely for inferences on the each chunk block, instead of the final response

Closes #282
2023-11-21 10:21:13 +00:00
HoneyryderChuck
fa513a9ac9 stream plugin: fix #each loop when used with webmock
when response would be called inside the #each block, the webmock trigger would inject the body before attaching the response object to the request, thereby retriggering #each in a loop

Closes #281
2023-11-21 10:08:29 +00:00
HoneyryderChuck
716e98af5b stream plugin: fix #each_line not yielding last chunk
the last line of the payload wasn't being yielded unless the last character of the payload was a newliine. this was overlooked for a time due to stream plugin being built for text/event-stream mime type, which follows that rule, as per what the tests cover.
2023-11-20 22:38:47 +00:00
HoneyryderChuck
b82e57c281 ad test for integration of webmock with follow_redirects and stream plugins 2023-11-19 22:43:30 +00:00
HoneyryderChuck
afead02c46 eliminate deprecated MiniTest module 2023-07-27 00:02:11 +01:00
Kevin Elliott
5108a6247f Fix WebMock adapter so that it gets disabled when WebMock gets disabled 2023-04-25 07:25:07 +00:00
HoneyryderChuck
1205c6964f load integrations by default when possible
this way, one can document a less special migration path, and even
change integration dirs if so desired.
2022-12-29 00:05:03 +00:00
HoneyryderChuck
411e8d0ab1 fixed linting 2022-02-24 01:27:06 +00:00
Thomas Cannon
f7bcc27385
Fix WebMock adapter to use request.query to build request signature
* Webmock allows users to stub a request using a URI with query
	parameters, as a shortcut instead of using `with...`
	* The Webmock adapter did not construct a URI that included the
		`request.query`, causing stubs that had the same host/path, but
		different queries, to return incorrect results
2022-02-23 11:08:59 -05:00
HoneyryderChuck
b700a4f994 bootstrapping standalone tests, test which need to run in full-isolation mode (own process), where proxy intgration via env var is tested 2022-01-12 01:43:08 +02:00