File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -161,42 +161,6 @@ def inspect # :nodoc:
161
161
end
162
162
end
163
163
164
- ##
165
- # Mimic the old (deprecated) interface. Make an HTTP request to Twilio
166
- # using the given +method+ and +uri+. If the +method+ is <tt>'GET'</tt>
167
- # then +params+ are appended to the +uri+ as urlencoded query parameters.
168
- # If the +method+ is <tt>'POST'</tt> or <tt>'PUT'</tt> then +params+ are
169
- # passed as an application/x-www-form-urlencoded string in the request
170
- # body.
171
- #
172
- # Returns the raw Net::HTTP::Response object.
173
- def request ( uri , method = 'POST' , params = { } ) # :nodoc:
174
- raise ArgumentError , 'Invalid path parameter' if uri . empty?
175
-
176
- uri = "/#{ uri } " unless uri . start_with? '/'
177
-
178
- case method . upcase
179
- when 'GET'
180
- uri << "?#{ url_encode ( params ) } " if params
181
- req = Net ::HTTP ::Get . new uri
182
- when 'DELETE'
183
- req = Net ::HTTP ::Delete . new uri
184
- when 'PUT'
185
- req = Net ::HTTP ::Put . new uri
186
- req . form_data = params
187
- when 'POST'
188
- req = Net ::HTTP ::Post . new uri
189
- req . form_data = params
190
- else
191
- raise NotImplementedError , "HTTP #{ method } not implemented"
192
- end
193
-
194
- req [ 'User-Agent' ] = 'twilio-ruby/deprecated'
195
- req . basic_auth @account_sid , @auth_token
196
- @last_request = req
197
- @last_response = @connection . request req
198
- end
199
-
200
164
private
201
165
202
166
##
You can’t perform that action at this time.
0 commit comments