axios / moxios

Mock axios requests for testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HAR support

bennycode opened this issue · comments

I really like moxios and I was wondering if you are planning to support HAR files?

At the moment I am always writing definitions like:

moxios.stubRequest('http://localhost:8080/resource', {
  status: 200,
  responseText: {value: 'Hello'}
});

It would be great if I could load a HTTP Archive which would then define the status and responseText (among other values).

Example:

moxios.stubRequest('./har/response.har');

There is such a functionality provided by sinon-har-server. Maybe you can make use of that!?

Kamino cloned this issue to anilanar/moxios