mirror of
https://github.com/seejohnrun/haste-client.git
synced 2025-12-17 09:11:29 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6430635bfa | ||
|
|
028e7c4424 | ||
|
|
b10fa4782a | ||
|
|
d8c4be9744 | ||
|
|
7913dd521d |
@@ -13,6 +13,12 @@ This can be really really cool in combination with `pbcopy`, like:
|
|||||||
|
|
||||||
after which the contents of `file` will be accessible at a URL which has been copied to your pasteboard.
|
after which the contents of `file` will be accessible at a URL which has been copied to your pasteboard.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
gem install haste
|
||||||
|
```
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
Please consider paying what you think haste-client is worth:
|
Please consider paying what you think haste-client is worth:
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ module Haste
|
|||||||
def start
|
def start
|
||||||
uri = URI.parse server
|
uri = URI.parse server
|
||||||
http = Net::HTTP.new uri.host, uri.port
|
http = Net::HTTP.new uri.host, uri.port
|
||||||
|
if uri.scheme =~ /^https/
|
||||||
|
http.use_ssl = true
|
||||||
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||||
|
end
|
||||||
response = http.post '/documents', @input
|
response = http.post '/documents', @input
|
||||||
if response.is_a?(Net::HTTPOK)
|
if response.is_a?(Net::HTTPOK)
|
||||||
data = JSON.parse(response.body)
|
data = JSON.parse(response.body)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module Haste
|
module Haste
|
||||||
|
|
||||||
VERSION = '0.1.4'
|
VERSION = '0.1.5'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user