Cross Reference: post_caller.rb
xref
: /
ontohub
/
lib
/
uri_fetcher
/
post_caller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
module
UriFetcher
class
PostCaller
<
HTTPCaller
HEADER
= {
'Content-Type'
=>
'
application
/
json
'
}
def
make_http_request
(
uri
, &
block
)
Net
::
HTTP.start
(
uri.hostname
,
uri.port
,
use_ssl
:
uri.scheme
==
'https'
)
do
|
http
|
http.read
_timeout
=
timeout
if
timeout
return
http.request
_post
(
uri
,
data_json
,
HEADER
, &
block
)
end
end
end
end