com.thoughtworks.webstub.dsl.HttpDsl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web-stub Show documentation
Show all versions of web-stub Show documentation
Library for stubbing external HTTP dependencies
package com.thoughtworks.webstub.dsl;
import com.thoughtworks.webstub.config.*;
import com.thoughtworks.webstub.dsl.builders.EntityEnclosingRequestBuilder;
import com.thoughtworks.webstub.dsl.builders.RequestBuilder;
public class HttpDsl extends ConfigurationProvider {
public HttpDsl(ConfigurationListener listener) {
super(listener);
}
public RequestBuilder get(String uri) {
return new RequestBuilder(this).withMethod("GET").withUri(uri);
}
public EntityEnclosingRequestBuilder post(String uri) {
return new EntityEnclosingRequestBuilder(this).withMethod("POST").withUri(uri);
}
public EntityEnclosingRequestBuilder put(String uri) {
return new EntityEnclosingRequestBuilder(this).withMethod("PUT").withUri(uri);
}
public RequestBuilder delete(String uri) {
return new RequestBuilder(this).withMethod("DELETE").withUri(uri);
}
public void reset() {
configurationCleared();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy