Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 761 - 770 of 1,142 for function (0.17 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/zh-hant/docs/advanced/response-change-status-code.md

    但如果資料不存在,你想要建立它,並回傳 HTTP 狀態碼 "CREATED" `201`。
    
    同時你仍希望能用 `response_model` 過濾並轉換所回傳的資料。
    
    在這些情況下,你可以使用 `Response` 參數。
    
    ## 使用 `Response` 參數 { #use-a-response-parameter }
    
    你可以在你的路徑操作函式(path operation function)中宣告一個 `Response` 型別的參數(就像你可以對 Cookies 和標頭那樣)。
    
    接著你可以在那個「*暫時的*」回應物件上設定 `status_code`。
    
    {* ../../docs_src/response_change_status_code/tutorial001_py310.py hl[1,9,12] *}
    
    然後你可以照常回傳任何需要的物件(例如 `dict`、資料庫模型等)。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/advanced/response-headers.md

    # 回應標頭 { #response-headers }
    
    ## 使用 `Response` 參數 { #use-a-response-parameter }
    
    你可以在你的*路徑操作函式(path operation function)*中宣告一個 `Response` 型別的參數(就像處理 Cookie 一樣)。
    
    然後你可以在那個*暫時性的* `Response` 物件上設定標頭。
    
    {* ../../docs_src/response_headers/tutorial002_py310.py hl[1, 7:8] *}
    
    接著你可以像平常一樣回傳任何你需要的物件(`dict`、資料庫模型等)。
    
    如果你宣告了 `response_model`,它仍會用來過濾並轉換你回傳的物件。
    
    FastAPI 會使用那個暫時性的回應來擷取標頭(還有 Cookie 與狀態碼),並把它們放到最終回應中;最終回應包含你回傳的值,且會依任何 `response_model` 進行過濾。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  3. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/vagrant/VagrantShellTask.java

    import org.gradle.api.DefaultTask;
    import org.gradle.api.tasks.Input;
    import org.gradle.api.tasks.TaskAction;
    
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.List;
    import java.util.function.UnaryOperator;
    import java.util.stream.Collectors;
    
    import static org.elasticsearch.gradle.internal.vagrant.VagrantMachine.convertLinuxPath;
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 4.3K bytes
    - Click Count (0)
  4. guava/src/com/google/common/collect/SingletonImmutableBiMap.java

    import com.google.common.annotations.J2ktIncompatible;
    import com.google.errorprone.annotations.concurrent.LazyInit;
    import com.google.j2objc.annotations.RetainedWith;
    import java.util.function.BiConsumer;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Implementation of {@link ImmutableMap} with exactly one entry.
     *
     * @author Jesse Wilson
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  5. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/ConfiguredGoalSupport.java

     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.cling.invoker.mvnenc.goals;
    
    import java.util.List;
    import java.util.Map;
    import java.util.function.Consumer;
    
    import org.apache.maven.api.services.MessageBuilderFactory;
    import org.apache.maven.cling.invoker.mvnenc.EncryptContext;
    import org.codehaus.plexus.components.secdispatcher.SecDispatcher;
    
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Jun 11 13:14:09 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  6. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/JavaClassPublicifier.java

    import org.objectweb.asm.tree.InnerClassNode;
    
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.nio.file.Files;
    import java.util.List;
    import java.util.function.Consumer;
    
    import static org.objectweb.asm.Opcodes.ACC_PRIVATE;
    import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
    
    /**
     * A task to manipulate an existing class file.
     */
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 4K bytes
    - Click Count (0)
  7. docs/fr/docs/tutorial/background-tasks.md

    Elle peut être une fonction asynchrone (`async def`) ou une fonction normale (`def`), **FastAPI** saura la gérer correctement.
    
    Dans cet exemple, la fonction de tâche écrira dans un fichier (afin de simuler un envoi d'email).
    
    L'opération d'écriture n'utilisant ni `async` ni `await`, on définit la fonction avec un `def` normal.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 5.5K bytes
    - Click Count (0)
  8. docs/es/docs/tutorial/handling-errors.md

    Debido a que es una excepción de Python, no la `return`, sino que la `raise`.
    
    Esto también significa que si estás dentro de una función de utilidad que estás llamando dentro de tu *path operation function*, y lanzas el `HTTPException` desde dentro de esa función de utilidad, no se ejecutará el resto del código en la *path operation function*, terminará ese request de inmediato y enviará el error HTTP del `HTTPException` al cliente.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 9.6K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/ImmutableMapKeySet.java

    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import java.io.Serializable;
    import java.util.Spliterator;
    import java.util.function.Consumer;
    import org.jspecify.annotations.Nullable;
    
    /**
     * {@code keySet()} implementation for {@link ImmutableMap}.
     *
     * @author Jesse Wilson
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  10. docs/es/docs/advanced/response-cookies.md

    # Cookies de Response { #response-cookies }
    
    ## Usar un parámetro `Response` { #use-a-response-parameter }
    
    Puedes declarar un parámetro de tipo `Response` en tu *path operation function*.
    
    Y luego puedes establecer cookies en ese objeto de response *temporal*.
    
    {* ../../docs_src/response_cookies/tutorial002_py310.py hl[1, 8:9] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 2.4K bytes
    - Click Count (0)
Back to Top