How to set the application name using the HTTP Client Library for Java?
问题 I am using the HTTP Client Library for Java to access the Google Custom Search API and perform a search. String key = "..."; String cx = "..."; String query = "..."; // Set up the HTTP transport and JSON factory HttpTransport httpTransport = new NetHttpTransport(); JsonFactory jsonFactory = new JacksonFactory(); Customsearch customsearch = new Customsearch(httpTransport, jsonFactory,null); List<Result> resultList = null; try { Customsearch.Cse.List list = customsearch.cse().list(query); list