0
votes

I know how to make a simulated mock and all about that.

The problem I have is that I am sending request to a server that returns very large XML responses (more than 2 mb), if I send the request from the web page it takes too long to respond or sometimes it does not return a response. If I send the request from postman it takes less time to respond.

that is why I need to send a (request - post) from the web page to my postman mock server and when it receives the request make another request to the server (2 mb) filter only the data I need and return to the web page a more light response (200 kb)

how can I do this? it's possible?

Thank you!!!

1
Why the response time is different between Browser and Postman? - shaochuancs

1 Answers

0
votes

What you need is a proxy server, not a mock server -- the server would proxy the HTTP(S) request to destination, intercept the HTTP response and make some customization.

In Postman, there are 2 ways to capture HTTP requests. Unfortunately, neither of them can be used to intercept and customize HTTP response.

Thus, you can write your own -- a simple web server which accepts HTTP request, send it to destination, receive response and make some customization, and finally return to client.