News for hackers. Stuff that matters.
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by Osiris on Thursday May 03, 2018 @03:26AM (#16984013)
This is a pretty cool tool. I'm currently working on a tool that addresses this problem in a different way, by standing up an API server that returns mock data based on the incoming request. It's targeted at an enterprise audience where dozens of APIs need to be mocked. This looks like a great solution for smaller teams or projects.
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by pimterry on Friday May 04, 2018 @08:01AM (#16993853)
I built one of these myself recently, you might be interested: https://github.com/pimterry/mockttp
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by drewsymo on Thursday May 03, 2018 @04:37AM (#16984280)
Might be a silly question, but is this any different to the Postman interceptor?

Edit: yes it’s very different! Didn’t see that you could return different responses dynamically.

Re:Show HN: Interceptor – mock AJAX requests at the browser ... by equalunique on Thursday May 03, 2018 @04:27PM (#16989605)
Having finished reading Neuromancer, the domain "codemancers.com" paired with a technique for hacking the browser into thinking it's receiving communications from the outside, this submission seems a little tongue-in-cheek.
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by leesalminen on Wednesday May 02, 2018 @11:23PM (#16983121)
Good stuff. Thanks for sharing!
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by Nashooo on Thursday May 03, 2018 @08:13AM (#16985226)
How usable is this in for example webdriverio tests?
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by amitmb on Thursday May 03, 2018 @10:42AM (#16986449)
webdriverio tests are basically automation tests similar to selenium tests. Looking at FIREFOX PROFILE SERVICE(http://webdriver.io/guide/services/firefox-profile.html), it looks like you can only fire up the extensions, but not define actions like click or type. If that would have been the case, One could have intercepted the requests, defined their own response and have automated tests defined for an app/website. Have a look at the blog post to understand the proper use case.
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by chatmasta on Thursday May 03, 2018 @01:10PM (#16987755)
Idk about FF, but I’ve zuccessfully loaded extensions into chrome selenium in the past. It doesn’t work with chrome headless AFAIK
Re:Show HN: Interceptor – mock AJAX requests at the browser ... by jlebrech on Thursday May 03, 2018 @04:11AM (#16984187)
wow, I needed that 3 years ago.