Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 171 for SetType (0.08 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

      private val client = OkHttpClient()
    
      fun run() {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        val requestBody =
          MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("title", "Square Logo")
            .addFormDataPart(
              "image",
              "logo-square.png",
              File("docs/images/logo-square.png").asRequestBody(MEDIA_TYPE_PNG),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/SimplexTransferListenerTest.java

        }
    
        private static TransferEvent event(
                RepositorySystemSession session, TransferResource resource, TransferEvent.EventType type) {
            return new TransferEvent.Builder(session, resource).setType(type).build();
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  3. compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java

            ComponentDependency cd = new ComponentDependency();
    
            cd.setArtifactId(extractArtifactId(d));
    
            cd.setGroupId(extractGroupId(d));
    
            cd.setType(d.getChild("type").getValue());
    
            cd.setVersion(extractVersion(d));
            return cd;
        }
    
        @SuppressWarnings("checkstyle:methodlength")
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          /**
           * Set the MIME type. Expected values for `type` are [MIXED] (the default), [ALTERNATIVE],
           * [DIGEST], [PARALLEL] and [FORM].
           */
          fun setType(type: MediaType) =
            apply {
              require(type.type == "multipart") { "multipart != $type" }
              this.type = type
            }
    
          /** Add a part to the body. */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. compat/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java

                                proxy = result.getProxy();
    
                                ProxyInfo proxyInfo = new ProxyInfo();
                                proxyInfo.setHost(proxy.getHost());
                                proxyInfo.setType(proxy.getProtocol());
                                proxyInfo.setPort(proxy.getPort());
                                proxyInfo.setNonProxyHosts(proxy.getNonProxyHosts());
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

        }
      }
    
      /** Confirm that [MultipartBody] and [MultipartReader] can work together. */
      @Test fun `multipart round trip`() {
        val body =
          MultipartBody.Builder("boundary")
            .setType(MultipartBody.PARALLEL)
            .addPart("Quick".toRequestBody("text/plain".toMediaType()))
            .addFormDataPart("color", "Brown")
            .addFormDataPart("animal", "fox.txt", "Fox".toRequestBody())
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  7. docs/recipes.md

          private val client = OkHttpClient()
    
          fun run() {
            // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
            val requestBody = MultipartBody.Builder()
                .setType(MultipartBody.FORM)
                .addFormDataPart("title", "Square Logo")
                .addFormDataPart("image", "logo-square.png",
                    File("docs/images/logo-square.png").asRequestBody(MEDIA_TYPE_PNG))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/TempFileCreator.java

                    .lookupPrincipalByName(getUsername());
            ImmutableList<AclEntry> acl =
                ImmutableList.of(
                    AclEntry.newBuilder()
                        .setType(ALLOW)
                        .setPrincipal(user)
                        .setPermissions(EnumSet.allOf(AclEntryPermission.class))
                        .setFlags(DIRECTORY_INHERIT, FILE_INHERIT)
                        .build());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 06 17:11:11 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  9. compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java

            }
    
            Artifact artifact = artifactFactory.createDependencyArtifact(
                    d.getGroupId(),
                    d.getArtifactId(),
                    versionRange,
                    d.getType(),
                    d.getClassifier(),
                    d.getScope(),
                    d.isOptional());
    
            if (Artifact.SCOPE_SYSTEM.equals(d.getScope()) && d.getSystemPath() != null) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 31.6K bytes
    - Viewed (0)
  10. compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java

            return ai;
        }
    
        private ProxyInfo proxyInfo(ArtifactRepository repository) {
            ProxyInfo proxyInfo = new ProxyInfo();
            proxyInfo.setHost(repository.getProxy().getHost());
            proxyInfo.setType(repository.getProxy().getProtocol());
            proxyInfo.setPort(repository.getProxy().getPort());
            proxyInfo.setNonProxyHosts(repository.getProxy().getNonProxyHosts());
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 29.9K bytes
    - Viewed (0)
Back to top