Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for contient (0.19 sec)

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

          return new MockResponse()
              .setStatus("HTTP/1.1 404")
              .addHeader("content-type: text/plain; charset=utf-8")
              .setBody("NOT FOUND: " + path);
        } catch (IOException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 500")
              .addHeader("content-type: text/plain; charset=utf-8")
              .setBody("SERVER ERROR: " + e);
        }
      }
    
    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

              + ")") : "(cache)";
          int responseCode = response.code();
    
          System.out.printf("%03d: %s %s%n", responseCode, url, responseSource);
    
          String contentType = response.header("Content-Type");
          if (responseCode != 200 || contentType == null) {
            return;
          }
    
          MediaType mediaType = MediaType.parse(contentType);
    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/Progress.java

            } else {
              if (firstUpdate) {
                firstUpdate = false;
                if (contentLength == -1) {
                  System.out.println("content-length: unknown");
                } else {
                  System.out.format("content-length: %d\n", contentLength);
                }
              }
    
              System.out.println(bytesRead);
    
              if (contentLength != -1) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

          Request originalRequest = chain.request();
          if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
            return chain.proceed(originalRequest);
          }
    
          Request compressedRequest = originalRequest.newBuilder()
              .header("Content-Encoding", "gzip")
              .method(originalRequest.method(), gzip(originalRequest.body()))
              .build();
    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)
  5. samples/guide/src/main/java/okhttp3/recipes/ParseResponseWithMoshi.java

            System.out.println(entry.getKey());
            System.out.println(entry.getValue().content);
          }
        }
      }
    
      static class Gist {
        Map<String, GistFile> files;
      }
    
      static class GistFile {
        String content;
      }
    
      public static void main(String... args) throws Exception {
        new ParseResponseWithMoshi().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.8K bytes
    - Viewed (0)
Back to top