Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1621 - 1630 of 2,572 for Creates (0.08 sec)

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

    # 响应 - 更改状态码
    
    你可能之前已经了解到,你可以设置默认的[响应状态码](../tutorial/response-status-code.md){.internal-link target=_blank}。
    
    但在某些情况下,你需要返回一个不同于默认值的状态码。
    
    ## 使用场景
    
    例如,假设你想默认返回一个HTTP状态码为“OK”`200`。
    
    但如果数据不存在,你想创建它,并返回一个HTTP状态码为“CREATED”`201`。
    
    但你仍然希望能够使用`response_model`过滤和转换你返回的数据。
    
    对于这些情况,你可以使用一个`Response`参数。
    
    ## 使用 `Response` 参数
    
    你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。
    
    然后你可以在这个*临时*响应对象中设置`status_code`。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial008b_an.py

    
    def test_get_item():
        response = client.get("/items/portal-gun")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 700 bytes
    - Viewed (0)
  3. cni/pkg/plugin/plugin_dryrun_test.go

    			getNs = generateMockGetNsFunc(testSandboxDirectory)
    			tmpDir := t.TempDir()
    			outputFilePath := filepath.Join(tmpDir, "output.txt")
    			if _, err := os.Create(outputFilePath); err != nil {
    				t.Fatalf("Failed to create temp file for IPTables rule output: %v", err)
    			}
    			t.Setenv(dependencies.DryRunFilePath.Name, outputFilePath)
    
    			pod := buildFakeDryRunPod()
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Aug 27 16:44:45 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/suggest/settings/ArraySettings.java

    import org.codelibs.fess.suggest.constants.FieldNames;
    import org.codelibs.fess.suggest.exception.SuggestSettingsException;
    import org.codelibs.fess.suggest.util.SuggestUtil;
    import org.opensearch.action.admin.indices.create.CreateIndexResponse;
    import org.opensearch.action.search.SearchResponse;
    import org.opensearch.client.Client;
    import org.opensearch.common.xcontent.XContentFactory;
    import org.opensearch.common.xcontent.XContentType;
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Sat Oct 12 00:10:39 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/HashBasedTableRowTest.java

    public class HashBasedTableRowTest extends RowTests {
      public HashBasedTableRowTest() {
        super(false, true, true, true, true);
      }
    
      @Override
      Table<Character, String, Integer> makeTable() {
        return HashBasedTable.create();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/HashBasedTableRowTest.java

    public class HashBasedTableRowTest extends RowTests {
      public HashBasedTableRowTest() {
        super(false, true, true, true, true);
      }
    
      @Override
      Table<Character, String, Integer> makeTable() {
        return HashBasedTable.create();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_metadata/test_tutorial001.py

                "summary": "Deadpool's favorite app. Nuff said.",
                "description": "\nChimichangApp API helps you do awesome stuff. 🚀\n\n## Items\n\nYou can **read items**.\n\n## Users\n\nYou will be able to:\n\n* **Create users** (_not implemented_).\n* **Read users** (_not implemented_).\n",
                "termsOfService": "http://example.com/terms/",
                "contact": {
                    "name": "Deadpoolio the Amazing",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. docs/site-replication/run-ssec-object-replication-with-compression.sh

    echo "done"
    
    # Enable compression for site minio1
    ./mc admin config set minio1 compression enable=on extensions=".txt" --insecure
    ./mc admin config set minio1 compression allow_encryption=off --insecure
    
    # Create bucket in source cluster
    echo "Create bucket in source MinIO instance"
    ./mc mb minio1/test-bucket --insecure
    
    # Load objects to source site
    echo "Loading objects to source MinIO instance"
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 08:03:58 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. build-logic/build-init-samples/src/main/kotlin/gradlebuild/samples/SamplesGenerator.kt

                .withBinding("classesUpToDate", "" + classesUpToDate)
                .create().generate()
            projectLayoutSetupRegistry.templateOperationFactory.newTemplateOperation()
                .withTemplate(templateFolder.template("build.sample.conf"))
                .withTarget(settings.target.file("../tests/build.sample.conf").asFile)
                .create().generate()
        }
    
        private
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Oct 22 11:11:17 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java

                    new TestStringMultisetGenerator() {
                      @Override
                      protected Multiset<String> create(String[] elements) {
                        return new StandardImplForwardingSortedMultiset<>(
                            TreeMultiset.create(asList(elements)));
                      }
    
                      @Override
                      public List<String> order(List<String> insertionOrder) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top