Class: ClaudeAgentSDK::McpHttpServerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, headers: nil) ⇒ McpHttpServerConfig

Returns a new instance of McpHttpServerConfig.



615
616
617
618
619
# File 'lib/claude_agent_sdk/types.rb', line 615

def initialize(url:, headers: nil)
  @type = 'http'
  @url = url
  @headers = headers
end

Instance Attribute Details

#headersObject

Returns the value of attribute headers.



613
614
615
# File 'lib/claude_agent_sdk/types.rb', line 613

def headers
  @headers
end

#typeObject

Returns the value of attribute type.



613
614
615
# File 'lib/claude_agent_sdk/types.rb', line 613

def type
  @type
end

#urlObject

Returns the value of attribute url.



613
614
615
# File 'lib/claude_agent_sdk/types.rb', line 613

def url
  @url
end

Instance Method Details

#to_hObject



621
622
623
624
625
# File 'lib/claude_agent_sdk/types.rb', line 621

def to_h
  result = { type: @type, url: @url }
  result[:headers] = @headers if @headers
  result
end