Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 149 for handle (0.06 sec)

  1. docs/en/docs/advanced/middleware.md

    If an incoming request does not validate correctly then a `400` response will be sent.
    
    ## `GZipMiddleware`
    
    Handles GZip responses for any request that includes `"gzip"` in the `Accept-Encoding` header.
    
    The middleware will handle both standard and streaming responses.
    
    {* ../../docs_src/advanced_middleware/tutorial003.py hl[2,6] *}
    
    The following arguments are supported:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:45:50 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. impl/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java

     */
    @Named
    @Singleton
    public class DefaultExceptionHandler implements ExceptionHandler {
        @Override
        public ExceptionSummary handleException(Throwable exception) {
            return handle("", exception);
        }
    
        private ExceptionSummary handle(String message, Throwable exception) {
            String reference = getReference(Collections.newSetFromMap(new IdentityHashMap<>()), exception);
    
            List<ExceptionSummary> children = null;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/events.md

    In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values.
    
    You can add more than one event handler function.
    
    And your application won't start receiving requests until all the `startup` event handlers have completed.
    
    ### `shutdown` event
    
    To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 10:36:22 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. docs/en/docs/how-to/custom-request-and-route.md

    ///
    
    We can also use this same approach to access the request body in an exception handler.
    
    All we need to do is handle the request inside a `try`/`except` block:
    
    {* ../../docs_src/custom_request_and_route/tutorial002.py hl[13,15] *}
    
    If an exception occurs, the`Request` instance will still be in scope, so we can read and make use of the request body when handling the error:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 22:39:38 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/background-tasks.md

    ## Create a task function
    
    Create a function to be run as the background task.
    
    It is just a standard function that can receive parameters.
    
    It can be an `async def` or normal `def` function, **FastAPI** will know how to handle it correctly.
    
    In this case, the task function will write to a file (simulating sending an email).
    
    And as the write operation doesn't use `async` and `await`, we define the function with normal `def`:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:22:48 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  6. compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java

         */
        @Deprecated
        public static DefaultRepositorySystemSession newSession() {
            DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(h -> false); // no close handle
            MavenSessionBuilderSupplier builder = new MavenSessionBuilderSupplier();
            session.setDependencyTraverser(builder.getDependencyTraverser());
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  7. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/ConsolePasswordPrompt.java

            return "Secure console password prompt";
        }
    
        @Override
        public Optional<String> configTemplate() {
            return Optional.empty();
        }
    
        @Override
        public String handle(String config) throws SecDispatcherException {
            if (NAME.equals(config)) {
                try {
                    return prompter.promptForPassword("Enter the master password: ");
                } catch (PrompterException e) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  8. compat/maven-compat/src/main/mdo/profiles.mdo

              <version>1.0.0</version>
              <description>How to handle downloading of releases from this repository</description>
              <association>
                <type>RepositoryPolicy</type>
              </association>
            </field>
            <field>
              <name>snapshots</name>
              <version>1.0.0</version>
              <description>How to handle downloading of snapshots from this repository</description>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/custom-docs-ui-assets.md

    You can probably right-click each link and select an option similar to `Save link as...`.
    
    **Swagger UI** uses the files:
    
    * <a href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js" class="external-link" target="_blank">`swagger-ui-bundle.js`</a>
    * <a href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css" class="external-link" target="_blank">`swagger-ui.css`</a>
    
    And **ReDoc** uses the file:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 10:42:34 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

        if depends is not None and depends.dependency is None:
            # Copy `depends` before mutating it
            depends = copy(depends)
            depends.dependency = type_annotation
    
        # Handle non-param type annotations like Request
        if lenient_issubclass(
            type_annotation,
            (
                Request,
                WebSocket,
                HTTPConnection,
                Response,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:46:26 UTC 2024
    - 34.7K bytes
    - Viewed (0)
Back to top