Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 318 for xHello (0.05 sec)

  1. docs_src/advanced_middleware/tutorial001.py

    from fastapi import FastAPI
    from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
    
    app = FastAPI()
    
    app.add_middleware(HTTPSRedirectMiddleware)
    
    
    @app.get("/")
    async def main():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 231 bytes
    - Viewed (0)
  2. docs_src/python_types/tutorial009b.py

    from typing import Union
    
    
    def say_hi(name: Union[str, None] = None):
        if name is not None:
            print(f"Hey {name}!")
        else:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 164 bytes
    - Viewed (0)
  3. src/archive/tar/writer_test.go

    			testReadFrom{fileOps{""}, 0, nil},
    			testReadFrom{fileOps{"a"}, 0, ErrWriteTooLong},
    			testRemaining{0, 0},
    		},
    	}, {
    		maker: makeReg{5, "hello"},
    		tests: []testFnc{
    			testRemaining{5, 5},
    			testWrite{"hello", 5, nil},
    			testRemaining{0, 0},
    		},
    	}, {
    		maker: makeReg{5, "\x00\x00\x00\x00\x00"},
    		tests: []testFnc{
    			testRemaining{5, 5},
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Sep 23 14:32:33 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  4. docs_src/response_headers/tutorial002.py

    from fastapi import FastAPI, Response
    
    app = FastAPI()
    
    
    @app.get("/headers-and-object/")
    def get_headers(response: Response):
        response.headers["X-Cat-Dog"] = "alone in the world"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 222 bytes
    - Viewed (0)
  5. docs_src/debugging/tutorial001.py

    import uvicorn
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
        a = "a"
        b = "b" + a
        return {"hello world": b}
    
    
    if __name__ == "__main__":
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 223 bytes
    - Viewed (0)
  6. compat/maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java

            UrlSource source = new UrlSource(txtFile);
            try (InputStream is = source.getInputStream();
                    Scanner scanner = new Scanner(is)) {
                assertEquals("Hello World!", scanner.nextLine());
            }
        }
    
        @Test
        void testGetLocation() throws Exception {
            URL txtFile = new File("target/test-classes/source.txt").toURI().toURL();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. docs_src/response_headers/tutorial001.py

    from fastapi import FastAPI
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    
    @app.get("/headers/")
    def get_headers():
        content = {"message": "Hello World"}
        headers = {"X-Cat-Dog": "alone in the world", "Content-Language": "en-US"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 309 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_response_headers/test_tutorial002.py

    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/headers-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 378 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_headers/test_tutorial001.py

    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/headers/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World"}
        assert response.headers["X-Cat-Dog"] == "alone in the world"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 426 bytes
    - Viewed (0)
  10. compat/maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java

            FileSource source = new FileSource(txtFile);
    
            try (InputStream is = source.getInputStream();
                    Scanner scanner = new Scanner(is)) {
    
                assertEquals("Hello World!", scanner.nextLine());
            }
        }
    
        @Test
        void testGetLocation() {
            File txtFile = new File("target/test-classes/source.txt");
            FileSource source = new FileSource(txtFile);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top