Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for html (0.16 sec)

  1. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        response.append(String.format("<html><head><title>%s</title></head><body>", basePath));
        response.append(String.format("<h1>%s</h1>", basePath));
        for (String file : directory.list()) {
          response.append(String.format("<div class='file'><a href='%s'>%s</a></div>",
              basePath + file, file));
        }
        response.append("</body></html>");
    
        return new MockResponse()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  2. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

    import okhttp3.MediaType;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    import org.jsoup.Jsoup;
    import org.jsoup.nodes.Document;
    import org.jsoup.nodes.Element;
    
    /**
     * Fetches HTML from a requested URL, follows the links, and repeats.
     */
    public final class Crawler {
      private final OkHttpClient client;
      private final Set<HttpUrl> fetchedUrls = Collections.synchronizedSet(new LinkedHashSet<>());
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

      public void run() throws Exception {
        Map<String, String> requestBody = new LinkedHashMap<>();
        requestBody.put("longUrl", "https://publicobject.com/2014/12/04/html-formatting-javadocs/");
        RequestBody jsonRequestBody = RequestBody.create(
            mapJsonAdapter.toJson(requestBody), MEDIA_TYPE_JSON);
        Request request = new Request.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 3.8K bytes
    - Viewed (0)
Back to top