Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Destination( Object testObject, String baseUrl) {
checkTestObject( testObject );
this.testObject = testObject;
this.baseUrl = baseUrl;
this.context = new RequestContext();
resetRequestContext();
}

/**
Expand All @@ -97,7 +97,7 @@ public Destination( Object testObject, String baseUrl, String proxyHost, int pro
this( testObject, baseUrl );
this.proxyHost = proxyHost;
this.proxyPort = proxyPort;
this.context = new RequestContext();
resetRequestContext();
}

/**
Expand All @@ -108,6 +108,13 @@ public RequestContext getRequestContext() {
return context;
}

/**
* Discards and creates a new {@link RequestContext} for this {@link Destination}.
*/
public void resetRequestContext(){
this.context = new RequestContext();
}

private void checkBaseUrl( String baseUrl ) {
if( baseUrl == null ) {
throw new IllegalArgumentException( "baseUrl must not be null" );
Expand Down