langflow
langflow copied to clipboard
feat(component): API Request Component Overhaul
Changes in API Request Component:
Major Changes:
- Input Structure:
- Removed cURL input field
- Changed NestedDictInput to TableInput for headers and body
- Added table schema definitions for better structure
- Modified method dropdown to have empty default value
- Build Config:
- Removed parse_curl method and related functionality
- Simplified update_build_config to only handle method changes
- Added body visibility toggle based on HTTP method
- Code Formatting:
- Improved line breaks and indentation
- Split long lines for better readability
- Added default_keys list
Minor Changes:
- TableInput:
- Added ToolModeMixin to TableInput class
- Enhanced table schema with key/value pairs
- Added descriptions for table fields
- UI/UX:
- Made timeout and headers advanced options
- Added real_time_refresh to method dropdown
- Improved description texts
- Code Cleanup:
- Removed print statement in add_query_params
- Improved error message formatting
- Enhanced code documentation
Technical Details:
- Modified input types for better type safety
- Enhanced error handling
- Improved code organization
- Added tool mode support for table inputs