AnchovyLegend from

I am trying to build an app that connects to the twitter api. To accomplish this, I need to send a http get request with a set of headers using Angular2.

Note, the below curl requests is successful (assuming the correct keys are in place).

This is what I tried, the only issue is, with the below implementation, I am an unable to pass in the necessary headers.

Was wondering if anybody has encountered this and has any suggestions on how to resolve?

Thanks in advance

constructor(private _http: Http) {

}

getTwitterResponse() {
         return this._http.get('https://api.twitter.com/1.1/statuses/home_timeline.json')
            .map(res => res.text);
}

Curl Request Sample w/ Headers (w/ auth keys removed)

 curl --get 'https://api.twitter.com/1.1/statuses/home_timeline.json' --header 'Authorization: OAuth oauth_consumer_key="123456", oauth_nonce="123456", oauth_signature="f%123456%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1475158916", oauth_token="123456", oauth_version="1.0"' --verbose

answered 9 months ago Lexus Sai Gon #

You ought to be a part of a contest for one of the best websites on the web. I will recommend this site!

answered 9 months ago apps gone free not in app store #1

Howdy thiѕ іs somewhat of off topic but I ᴡаs wanting tο кnow if blogs usе WYSIWYG editors οr if уou haѵe tօ manually code wіth HTML. I'm starting a blog soon but have no coding skills so I wanted to ǥet advice from someone with experience. Any helр woսld be enormously appreciated!

answered 8 months ago broscience.com #2

Ahaa, its fastidious conversation on the topic of this paragraph at this place at this blog, I have read all that, soo aat this time me also commenting here.

answered 7 months ago depilacja.torun.pl #3

I have been exploring for a little for any high quality articles or blog posts on this kind of space . Exploring in Yahoo I eventually stumbled upon this site. Reading this info So i am satisfied to exhibit that I have a very just right uncanny feeling I found out just what I needed. I so much without a doubt will make certain to do not disregard this website and give it a look regularly.

answered 6 months ago Bro Science #4

I am extremely inspired with your writing abilities as well as with the layout on your weblog. Is that this a pawid topic or did you modify it you self? Anyway keep up the excellent quality writing, it is rare to see a great weblog like this one nowadays..

answered 4 months ago BroScience #5

Superb, what a web site it is! This webpage presents useful data to us, krep iit up.

answered 3 months ago new movies online #6

I don't even know how I finished up right here, but I thought this put up was great. I do not recognize who you are but certainly you are going to a well-known blogger if you happen to are not already. Cheers!

answered 2 weeks ago jual baju renang muslimah #7

If you are going for most excellent contents like me, just go to see this website all the time because it presents feature contents, thanks


Leave a answer:


Related Questions

Sending an HTTP request with headers in Angular2

I am trying to build an app that connects to the twitter api. To accomplish this, I need to send a http get request with a set of headers using...