langflow icon indicating copy to clipboard operation
langflow copied to clipboard

feat(component): API Request Component Overhaul

Open Vigtu opened this issue 1 year ago • 5 comments

Changes in API Request Component:

Major Changes:

  1. 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
  1. 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
  1. Code Formatting:
  • Improved line breaks and indentation
  • Split long lines for better readability
  • Added default_keys list

Minor Changes:

  1. TableInput:
  • Added ToolModeMixin to TableInput class
  • Enhanced table schema with key/value pairs
  • Added descriptions for table fields
  1. UI/UX:
  • Made timeout and headers advanced options
  • Added real_time_refresh to method dropdown
  • Improved description texts
  1. 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

Vigtu avatar Dec 02 '24 20:12 Vigtu