Filter capture of Incoming Requests in proxy by content type (specifically json)

Hi there!

Initially I was using mitmproxy to capture API requests, but I recently tried switching to Postman because it seems a bit more user friendly…

I got everything set up acording to this article: including capturing https traffic and bypassing HSTS etc

Anyways, the issue is that it’s capturing way too much.

It’s capturing calls to GET Images, it’s capturing calls to GET Css files… It’s capturing calls to GETs to requests where the response body is a lot of html - It’s capturing OPTIONs calls

Is it possible to configure Postman to only capture requests where the request or response are content type is application/json ? I’m only try to capture requests from and to the api part (and unfortunately the API calls and all the other html related things are on the same domain, so I can’t filter by domain)


Hey Ron! Welcome to the Postman community and congrats on your first post!

So from what I’m understanding, you are using the Postman Proxy way of capturing HTTPS traffic. Have you tried using the interceptor instead? With the interceptor, you can define the method to capture (GET, POST etc.) but also match only specific URLs as well.

As for the proxy, there does appear to be a way to filter based off of resources.

Under Configure Incoming Requests , there are additional options you can use to limit the requests and responses captured:

  • URL must contain : Only capture URLs containing the specified string or regular expression.
  • URL cannot contain : Don’t capture URLs containing the specified string or regular expression.
  • Methods : Only capture the selected methods.
  • Resources : Exclude requests with image, JS, or CSS responses.

Hope this helps! :smile: