We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab4d85d commit 3dec5faCopy full SHA for 3dec5fa
lib/line/bot/client.rb
@@ -371,6 +371,25 @@ def get(endpoint_path)
371
request.get
372
end
373
374
+ # Post data, get content of specified URL.
375
+ #
376
+ # @param endpoint_path [String]
377
378
+ # @return [Net::HTTPResponse]
379
+ def post(endpoint_path, payload=nil)
380
+ raise Line::Bot::API::InvalidCredentialsError, 'Invalidates credentials' unless credentials?
381
+
382
+ request = Request.new do |config|
383
+ config.httpclient = httpclient
384
+ config.endpoint = endpoint
385
+ config.endpoint_path = endpoint_path
386
+ config.credentials = credentials
387
+ config.payload = payload if payload
388
+ end
389
390
+ request.post
391
392
393
# Delete content of specified URL.
394
#
395
# @param endpoint_path [String]
0 commit comments