Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. private static final String firexFox_userAgent = "Mozilla/5.0 (Windows NT 6.1; rv:40.0) Gecko/20100101 Firefox/40.0";
  2.  
  3. private static final HttpRequestInitializer intializer = new HttpRequestInitializer() {
  4. @Override
  5. public void initialize(HttpRequest request) throws IOException {
  6. final HttpHeaders headers = request.getHeaders();
  7. List<String> agents = new ArrayList<>();
  8. agents.add(firexFox_userAgent);
  9. headers.put("User-Agent", agents);
  10. }
  11. };
  12.  
  13. private static UserRegistrationApi mUserRegApi mUserRegBuilder = new UserRegistrationApi.Builder(EnpointConsts.sAndroidHttp, EnpointConsts.sGsonFactory, CredentialHolder.getCredential()).setApplicationName(Consts.APP_ID).setHttpRequestInitializer(intializer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement