mirror of
				https://gitlab.sectorq.eu/jaydee/omv_backup.git
				synced 2025-10-31 10:31:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			566 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			566 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| from __future__ import annotations
 | |
| 
 | |
| from dataclasses import dataclass, field
 | |
| 
 | |
| from ..._base_connection import _TYPE_BODY
 | |
| 
 | |
| 
 | |
| @dataclass
 | |
| class EmscriptenRequest:
 | |
|     method: str
 | |
|     url: str
 | |
|     params: dict[str, str] | None = None
 | |
|     body: _TYPE_BODY | None = None
 | |
|     headers: dict[str, str] = field(default_factory=dict)
 | |
|     timeout: float = 0
 | |
|     decode_content: bool = True
 | |
| 
 | |
|     def set_header(self, name: str, value: str) -> None:
 | |
|         self.headers[name.capitalize()] = value
 | |
| 
 | |
|     def set_body(self, body: _TYPE_BODY | None) -> None:
 | |
|         self.body = body
 | 
