Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.github.tomakehurst.wiremock.WireMockServer;
- import static com.github.tomakehurst.wiremock.client.WireMock.*;
- import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
- public class Main {
- public static void main(String[] args) {
- WireMockServer wireMockServer = new WireMockServer(
- wireMockConfig()
- //.port(8089)
- .asynchronousResponseEnabled(true)); //No-args constructor will start on port 8080, no HTTPS
- wireMockServer.start();
- stubFor(post(urlEqualTo("/post")).withRequestBody()
- .willReturn(aResponse()
- .withHeader("Content-Type", "text/plain")
- .withBody("ok")));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement