respx icon indicating copy to clipboard operation
respx copied to clipboard

Add a files pattern?

Open lundberg opened this issue 5 years ago • 0 comments

As mentioned in #87, it might be of interest to allow matching a request on files being sent.

  • What do we want to match on?
  • Is it even possible once internal HTTPX request is built.
route = respx.post("https://example.org/", files=?)

Since uploading files with HTTPX supports multiple arg types, it might only be possible to match on file names, if given. Reading a file object's content could affect HTTPX internals, if not handled properly, like reseting seek point etc.

Needs further investigation, multiple files.

lundberg avatar Nov 23 '20 09:11 lundberg