forked from loafle/openapi-generator-original
update samples
This commit is contained in:
parent
63c1b1350d
commit
520f87abae
@ -68,6 +68,7 @@ public class ApiClient {
|
||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||
protected String userAgent;
|
||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||
|
||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
||||
@ -438,10 +439,19 @@ public class ApiClient {
|
||||
* @return API client
|
||||
*/
|
||||
public ApiClient setUserAgent(String userAgent) {
|
||||
userAgent = userAgent;
|
||||
addDefaultHeader("User-Agent", userAgent);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User-Agent header's value.
|
||||
* @return User-Agent string
|
||||
*/
|
||||
public String getUserAgent(){
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a default header.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user