Class: PSWinCom::HttpSender
- Inherits:
-
Object
- Object
- PSWinCom::HttpSender
- Defined in:
- lib/pswincom/httpsender.rb
Constant Summary collapse
- API_HOST =
'http://gw2-fro.pswin.com:81/'
Instance Method Summary collapse
-
#initialize ⇒ HttpSender
constructor
A new instance of HttpSender.
- #send(request) ⇒ Object
Constructor Details
Instance Method Details
#send(request) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/pswincom/httpsender.rb', line 13 def send request url = URI.parse @host post = Net::HTTP::Post.new(url.path) post.body = request.xml post.content_type = 'text/xml' Net::HTTP.start(url.host, url.port) {|http| http.request(post)} end |