Skip to content

Commit

Permalink
GET IN THE BACKSEAT BABY
Browse files Browse the repository at this point in the history
  • Loading branch information
perlisweird committed Mar 23, 2017
1 parent 397e6ab commit 958c1d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors = ["Perl I. W. <support@frog.tips>"]
log = "0.3.6"
itertools = "0.4.13"
hyper = "0.10.5"
hyper-native-tls = "0.2"
rustc-serialize = "0.3.19"
getopts = "0.2"
time = "0.1"
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern crate itertools;
#[macro_use]
extern crate rustc_serialize;
extern crate hyper;
extern crate hyper_native_tls;
extern crate getopts;
extern crate time;

Expand Down
6 changes: 5 additions & 1 deletion src/the_impl_ya_dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ mod text_source {

mod tip_source {
use hyper;
use hyper_native_tls;
use rustc_serialize::json;

use std::io::Read;
Expand Down Expand Up @@ -269,7 +270,10 @@ mod tip_source {
impl TipSource {
pub fn new(api_key: String) -> TipSource {
let client = {
let mut client = hyper::Client::new();
// TODO: GET OUT OF MY DREAMS AND INTO MY CAR
let ssl = hyper_native_tls::NativeTlsClient::new().unwrap();
let connector = hyper::net::HttpsConnector::new(ssl);
let mut client = hyper::Client::with_connector(connector);
let ten_seconds = Some(::std::time::Duration::from_secs(10));
client.set_read_timeout(ten_seconds);
client.set_write_timeout(ten_seconds);
Expand Down

0 comments on commit 958c1d1

Please sign in to comment.