8000 Add ability to reset RequestContext on a Destination by dcrissman · Pull Request #29 · eclipsesource/restfuse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add ability to reset RequestContext on a Destination #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
0