Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 176 for requestBody (0.19 sec)

  1. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

          offset: Int = 0,
          byteCount: Int = size,
        ): RequestBody = commonToRequestBody(contentType, offset, byteCount)
    
        /** Returns a new request body that transmits the content of this. */
        @JvmStatic
        @JvmName("create")
        fun File.asRequestBody(contentType: MediaType? = null): RequestBody {
          return object : RequestBody() {
            override fun contentType() = contentType
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 25 14:41:37 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

        assertOnFileDescriptor { fd ->
          val requestBody = fd.toRequestBody()
    
          assertThat(requestBody.contentLength()).isEqualTo(-1L)
          assertThat(requestBody.isOneShot()).isEqualTo(true)
        }
      }
    
      @Test
      fun testFileDescriptorRead() {
        assertOnFileDescriptor(content = "Hello") { fd ->
          val requestBody = fd.toRequestBody()
    
          val buffer = Buffer()
          requestBody.writeTo(buffer)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (1)
  3. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    import okio.BufferedSink;
    
    public final class PostStreaming {
      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        RequestBody requestBody = new RequestBody() {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/fess/it/admin/ReqHeaderTests.java

            final Map<String, Object> requestBody = new HashMap<>();
            requestBody.put("name", "test_webconfig");
            requestBody.put("urls", "http://www.example.com");
            requestBody.put("user_agent", "Mozilla/5.0");
            requestBody.put("num_of_thread", 5);
            requestBody.put("interval_time", 1000);
            requestBody.put("boost", 100.0);
            requestBody.put("available", true);
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/fess/it/admin/AccessTokenTests.java

        }
    
        @Override
        protected Map<String, Object> createTestParam(int id) {
            final Map<String, Object> requestBody = new HashMap<>();
            final String keyProp = NAME_PREFIX + id;
            requestBody.put(KEY_PROPERTY, keyProp);
            requestBody.put("permissions", "Radmin-api");
            return requestBody;
        }
    
        @Override
        protected Map<String, Object> getUpdateMap() {
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/it/admin/dict/MappingTests.java

        }
    
        @Override
        protected Map<String, Object> createTestParam(int id) {
            final Map<String, Object> requestBody = new HashMap<>();
            final String keyProp = NAME_PREFIX + id;
            requestBody.put(KEY_PROPERTY, keyProp);
            requestBody.put("output", "output");
            return requestBody;
        }
    
        @Override
        protected Map<String, Object> getUpdateMap() {
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

          ),
        )
    
        val requestBody = AsyncRequestBody()
    
        val call =
          client.newCall(
            Request(
              url = server.url("/"),
              body = requestBody,
            ),
          )
    
        call.execute().use { response ->
          assertThat(response.body.string()).isEqualTo("abc")
          val requestBodyOut = requestBody.takeSink()
          assertFailsWith<IOException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/fess/it/admin/FileAuthTests.java

            final Map<String, Object> requestBody = new HashMap<>();
            requestBody.put("name", "test_fileconfig");
            requestBody.put("paths", "file:///example/path/");
            requestBody.put("num_of_thread", 5);
            requestBody.put("interval_time", 1000);
            requestBody.put("boost", 100.0);
            requestBody.put("available", true);
            requestBody.put("sort_order", 1);
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt

    fun Request.Builder.commonPost(body: RequestBody): Request.Builder = method("POST", body)
    
    fun Request.Builder.commonDelete(body: RequestBody?): Request.Builder = method("DELETE", body)
    
    fun Request.Builder.commonPut(body: RequestBody): Request.Builder = method("PUT", body)
    
    fun Request.Builder.commonPatch(body: RequestBody): Request.Builder = method("PATCH", body)
    
    fun Request.Builder.commonMethod(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  10. 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