Skip to content

Commit 0c507d7

Browse files
committed
fix request method types to be a Symbol or a String
1 parent dc6a860 commit 0c507d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/octokit/connection.cr

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ module Octokit
117117
@agent = nil
118118
end
119119

120-
protected def request(method : Symbol, path : String, options = nil)
120+
protected def request(method : Symbol | String, path : String, options = nil)
121121
path = File.join(endpoint, path) unless path.nil? || path.starts_with?("http")
122122
options = options ? @connection_options.merge(options) : @connection_options
123123
@last_response = response = agent.request(verb: method.to_s, uri: path, options: options)
124124
handle_error(response)
125125
response.body
126126
end
127127

128-
protected def request(method : Symbol, path : String, options = nil, &)
128+
protected def request(method : Symbol | String, path : String, options = nil, &)
129129
path = File.join(endpoint, path) unless path.nil? || path.starts_with?("http")
130130
options = options ? @connection_options.merge(options) : @connection_options
131131
@last_response = response = agent.request(verb: method, uri: path, options: options)

0 commit comments

Comments
 (0)