1

I am looking for some info on how to intercept the api calls in the karate UI automation. Currently my use case is very similar to the one below, where i am looking at checking few request headers to redirect/block the request. https://github.com/puppeteer/puppeteer/blob/master/examples/block-images.js

Any tips would be helpful !

Thanks !

svg
  • 57
  • 7

1 Answers1

1

This has just been released as 0.9.6.RC2 ! Nice timing :)

Here is the documentation: https://github.com/intuit/karate/tree/develop/karate-core#intercepting-http-requests

You can see a video here: https://twitter.com/KarateDSL/status/1248996522357739521

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • thanks Peter for quick response. Do you also have examples of how to read the request headers ? – svg Apr 22 '20 at 23:14
  • @svg wow, straight into advanced use-cases ! yes, you have to understand how karate mocks work, here you go: https://github.com/intuit/karate/tree/master/karate-netty#headercontains – Peter Thomas Apr 23 '20 at 02:03