Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for someheader (0.1 sec)

  1. tests/test_repeated_dependency_schema.py

    from fastapi import Depends, FastAPI, Header, status
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    def get_header(*, someheader: str = Header()):
        return someheader
    
    
    def get_something_else(*, someheader: str = Depends(get_header)):
        return f"{someheader}123"
    
    
    @app.get("/")
    def get_deps(dep1: str = Depends(get_header), dep2: str = Depends(get_something_else)):
        return {"dep1": dep1, "dep2": dep2}
    
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. cmd/handler-utils.go

    func extractMetadataFromReq(ctx context.Context, r *http.Request) (metadata map[string]string, err error) {
    	return extractMetadata(ctx, textproto.MIMEHeader(r.Form), textproto.MIMEHeader(r.Header))
    }
    
    func extractMetadata(ctx context.Context, mimesHeader ...textproto.MIMEHeader) (metadata map[string]string, err error) {
    	metadata = make(map[string]string)
    
    	for _, hdr := range mimesHeader {
    		// Extract all query values.
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  3. cmd/handler-utils_test.go

    		},
    	}
    
    	// Validate if the extracting headers.
    	for i, testCase := range testCases {
    		metadata := make(map[string]string)
    		err := extractMetadataFromMime(context.Background(), textproto.MIMEHeader(testCase.header), metadata)
    		if err != nil && !testCase.shouldFail {
    			t.Fatalf("Test %d failed to extract metadata: %v", i+1, err)
    		}
    		if err == nil && testCase.shouldFail {
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. cmd/bucket-handlers.go

    			hashReader.SetExpectedMax(lengthRange.Max)
    		}
    	}
    
    	// Extract metadata to be saved from received Form.
    	metadata := make(map[string]string)
    	err = extractMetadataFromMime(ctx, textproto.MIMEHeader(formValues), metadata)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	rawReader := hashReader
    	pReader := NewPutObjReader(rawReader)
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 63.4K bytes
    - Viewed (0)
  5. cmd/object-handlers.go

    					continue
    				}
    				if strings.HasPrefix(k, "minio.metadata.") {
    					k = strings.TrimPrefix(k, "minio.metadata.")
    					hdrs.Set(k, v)
    				}
    			}
    			m, err := extractMetadata(ctx, textproto.MIMEHeader(hdrs))
    			if err != nil {
    				return err
    			}
    			for k, v := range m {
    				metadata[k] = v
    			}
    		} else {
    			versionID = r.Form.Get(xhttp.VersionID)
    			hdrs = r.Header
    		}
    
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
  6. api/go1.14.txt

    pkg net/http, type Transport struct, DialTLSContext func(context.Context, string, string) (net.Conn, error)
    pkg net/http/httptest, type Server struct, EnableHTTP2 bool
    pkg net/textproto, method (MIMEHeader) Values(string) []string
    pkg strconv, method (*NumError) Unwrap() error
    pkg syscall (windows-386), const CTRL_CLOSE_EVENT = 2
    pkg syscall (windows-386), const CTRL_CLOSE_EVENT ideal-int
    Registered: Tue Oct 29 11:13:09 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 508.9K bytes
    - Viewed (0)
Back to top