1.4.1 • Published 3 years ago

wiremock-easy-client v1.4.1

Weekly downloads
586
License
MIT
Repository
github
Last release
3 years ago

wiremock client

This library can be used if a Wiremock instance is running, to interact like the actions given in the api http://wiremock.org/docs/api/

Usage

import { WiremockHelper, stubForOkResponseWithBody, forGetRequestMatchingUrl} from 'wiremock-client';

const wiremockClient = new WiremockHelper();
/*
Sample mapping to be configured in wiremock server
{
    request: {
        url: '/sample/path',
        method: 'GET'
    },
    response: {
        status: 200,
        jsonBody: {
            "greeting": "Hello world."
        }
    }
}
 */
const sampleMapping = stubForOkResponseWithBody(
    forGetRequestMatchingUrl("/sample/path"), 
    '{"greeting": "Hello world."}'
    )       

wiremockClient.addMapping(sampleMapping);
1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.0

6 years ago