Search Options

Results per page
Sort
Preferred Languages
Advance

Results 671 - 680 of 1,721 for item (0.05 sec)

  1. docs/zh/docs/advanced/response-directly.md

    出于方便,**FastAPI** 会提供与 `starlette.responses` 相同的 `fastapi.responses` 给开发者。但是大多数可用的响应都直接来自 Starlette。
    
    ///
    
    ## 返回自定义 `Response`
    
    上面的例子展示了需要的所有部分,但还不够实用,因为你本可以只是直接返回 `item`,而**FastAPI** 默认帮你把这个 `item` 放到 `JSONResponse` 中,又默认将其转换成了 `dict`等等。
    
    现在,让我们看看你如何才能返回一个自定义的响应。
    
    假设你想要返回一个 <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a> 响应。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. build-logic/binary-compatibility/src/main/groovy/gradlebuild/EnrichedReportRenderer.groovy

                        // Filtering an array is NOT in place
                        result.acceptedApiChanges = result.acceptedApiChanges.filter((item, pos, ary) => (!pos || (JSON.stringify(item) != JSON.stringify(ary[pos - 1]))));
                        return result;
                    }
    
                    function acceptAllErrorCorrections() {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Feb 07 20:38:43 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  3. cmd/batch-expire.go

    				}
    			}
    			var match BatchJobExpireFilter
    			var found bool
    			for _, rule := range r.Rules {
    				if rule.Matches(result.Item, now) {
    					match = rule
    					found = true
    					break
    				}
    			}
    			if !found {
    				continue
    			}
    
    			prevObj = result.Item
    			matchedFilter = match
    			versionsCount = 1
    			// Include the latest version
    			if matchedFilter.Purge.RetainVersions == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  4. fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/XpathTransformer.java

            buf.append("<list>");
            if (values != null && !values.isEmpty()) {
                for (final String value : values) {
                    buf.append("<item>");
                    buf.append(trimSpace(XmlUtil.escapeXml(value)));
                    buf.append("</item>");
                }
            }
            buf.append("</list>");
            // TODO support other type
            // TODO trim(default)
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Sat Oct 12 01:40:57 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/response-model.md

    ///
    
    #### デフォルト値を持つフィールドの値を持つデータ
    
    しかし、ID`bar`のitemのように、デフォルト値が設定されているモデルのフィールドに値が設定されている場合:
    
    ```Python hl_lines="3 5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    それらはレスポンスに含まれます。
    
    #### デフォルト値と同じ値を持つデータ
    
    ID`baz`のitemのようにデフォルト値と同じ値を持つデータの場合:
    
    ```Python hl_lines="3 5 6"
    {
        "name": "Baz",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  6. docs/pt/docs/advanced/response-directly.md

    ///
    
    ## Retornando uma `Response`
    
    O exemplo acima mostra todas as partes que você precisa, mas ainda não é muito útil, já que você poderia ter retornado o `item` diretamente, e o **FastAPI** colocaria em uma `JSONResponse` para você, convertendo em um `dict`, etc. Tudo isso por padrão.
    
    Agora, vamos ver como você pode usar isso para retornar uma resposta personalizada.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. .github/PULL_REQUEST_TEMPLATE

    This PR will be imported into Gerrit with the title and first
    comment (this text) used to generate the subject and body of
    the Gerrit change.
    
    **Please ensure you adhere to every item in this list.**
    
    More info can be found at https://github.com/golang/go/wiki/CommitMessage
    
    + The PR title is formatted as follows: `net/http: frob the quux before blarfing`
      + The package name goes before the colon
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Feb 21 02:07:46 UTC 2018
    - 1.2K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/query-params-str-validations.md

    {!../../docs_src/query_params_str_validations/tutorial008.py!}
    ```
    
    ## エイリアスパラメータ
    
    パラメータに`item-query`を指定するとします.
    
    以下のような感じです:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    しかし、`item-query`は有効なPythonの変数名ではありません。
    
    最も近いのは`item_query`でしょう。
    
    しかし、どうしても`item-query`と正確に一致している必要があるとします...
    
    それならば、`alias`を宣言することができます。エイリアスはパラメータの値を見つけるのに使用されます:
    
    ```Python hl_lines="9"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. docs/nl/docs/python-types.md

    ///
    
    Dat betekent: “de variabele `items` is een `list`, en elk van de items in deze list is een `str`”.
    
    /// tip
    
    Als je Python 3.9 of hoger gebruikt, hoef je `List` niet te importeren uit `typing`, je kunt in plaats daarvan hetzelfde reguliere `list` type gebruiken.
    
    ///
    
    Door dat te doen, kan je editor ondersteuning bieden, zelfs tijdens het verwerken van items uit de list:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  10. cmd/mrf.go

    			n, err := mw.Write(data[:])
    			if err != nil {
    				w.CloseWithError(err)
    				return
    			}
    			if n != len(data) {
    				w.CloseWithError(io.ErrShortWrite)
    				return
    			}
    			for item := range m.opCh {
    				err = item.EncodeMsg(mw)
    				if err != nil {
    					break
    				}
    			}
    			mw.Flush()
    			w.CloseWithError(err)
    		}()
    		return r
    	}
    
    	globalLocalDrivesMu.RLock()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:26:05 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top