Java Code Examples for java.net.CookieHandler#put()

The following examples show how to use java.net.CookieHandler#put() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: URLite.java    From httplite with Apache License 2.0 5 votes vote down vote up
void saveCookie(String url, Map<String, List<String>> headers) {
    if (!isUseCookie()) {
        return;
    }
    try {
        CookieHandler cookieManager = getCookieHandler();
        if (headers != null) {
            cookieManager.put(URI.create(url), headers);
        }
    } catch (Throwable ex) {
        LogUtil.e(ex.getMessage(), ex);
    }
}
 
Example 2
Source File: IosHttpURLConnection.java    From j2objc with Apache License 2.0 5 votes vote down vote up
private static void saveResponseCookies(URL url, Map<String, List<String>> headerFields)
    throws IOException {
  CookieHandler cookieHandler = CookieHandler.getDefault();
  if (cookieHandler != null) {
    try {
      URI uri = url.toURI();
      cookieHandler.put(uri, headerFields);
    } catch (URISyntaxException e) {
      throw new IOException(e);
    }
  }
}
 
Example 3
Source File: HttpEngine.java    From L.TileLayer.Cordova with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 4
Source File: HttpEngine.java    From IoTgo_Android_App with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 5
Source File: HttpEngine.java    From android-discourse with Apache License 2.0 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
    CookieHandler cookieHandler = client.getCookieHandler();
    if (cookieHandler != null) {
        cookieHandler.put(uri, headers.toMultimap(true));
    }
}
 
Example 6
Source File: HttpEngine.java    From bluemix-parking-meter with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 7
Source File: HttpEngine.java    From reader with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 8
Source File: HttpEngine.java    From reader with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 9
Source File: HttpEngine.java    From cordova-amazon-fireos with Apache License 2.0 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 10
Source File: HttpEngine.java    From phonegapbootcampsite with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 11
Source File: HttpEngine.java    From CordovaYoutubeVideoPlayer with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 12
Source File: HttpEngine.java    From cordova-android-chromeview with Apache License 2.0 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = policy.cookieHandler;
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 13
Source File: HttpEngine.java    From wildfly-samples with MIT License 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 14
Source File: HttpEngine.java    From phonegap-plugin-loading-spinner with Apache License 2.0 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = policy.cookieHandler;
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}
 
Example 15
Source File: HttpEngine.java    From crosswalk-cordova-android with Apache License 2.0 4 votes vote down vote up
public void receiveHeaders(RawHeaders headers) throws IOException {
  CookieHandler cookieHandler = client.getCookieHandler();
  if (cookieHandler != null) {
    cookieHandler.put(uri, headers.toMultimap(true));
  }
}