Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Gurpartap/OARequestHeader
A quickie to generate OAuth headers when using OAuthConsumer library in Mac and iPhone apps.
https://github.com/Gurpartap/OARequestHeader
Last synced: 2 months ago
JSON representation
A quickie to generate OAuth headers when using OAuthConsumer library in Mac and iPhone apps.
- Host: GitHub
- URL: https://github.com/Gurpartap/OARequestHeader
- Owner: Gurpartap
- License: mit
- Created: 2010-06-29T08:19:15.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-12-17T06:30:10.000Z (about 13 years ago)
- Last Synced: 2023-04-14T07:18:01.047Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 84 KB
- Stars: 14
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
- awesome - OARequestHeader - A quickie to generate OAuth headers when using OAuthConsumer library in Mac and iPhone apps. (etc)
- awesome - OARequestHeader - A quickie to generate OAuth headers when using OAuthConsumer library in Mac and iPhone apps. (etc)
README
OARequestHeader
===============A quickie to generate OAuth headers when using OAuthConsumer library in Mac and iPhone applications. OARequestHeaders provides a NSString of generated request headers to be used to HTTP requests (for example with ASIHTTPRequest, etc.)
Example Usage
-----This is how OARequestHeader is implemented in GSTwitPicEngine - (http://github.com/Gurpartap/GSTwitPicEngine):
OAConsumer *consumer = [[[OAConsumer alloc] initWithKey:TWITTER_OAUTH_CONSUMER_KEY secret:TWITTER_OAUTH_CONSUMER_SECRET] autorelease];// NSLog(@"consumer: %@", consumer);
OARequestHeader *requestHeader = [[[OARequestHeader alloc] initWithProvider:@"https://api.twitter.com/1/account/verify_credentials.json"
method:@"GET"
consumer:consumer
token:_accessToken
realm:@"http://api.twitter.com/"] autorelease];
NSString *oauthHeaders = [requestHeader generateRequestHeaders];NSLog(@"requestHeaders: %@", requestHeaders);
// Set your request's headers to oauthHeaders.
Contact
-------Find me on Twitter: http://twitter.com/Gurpartap
Or use the form at http://gurpartap.com/contact to talk privately (ooooh!!).License
-------Copyright (c) 2010 Gurpartap Singh, http://gurpartap.com/
This code is licensed under the MIT License
You are free:
* to Share — to copy, distribute and transmit the work
* to Remix — to adapt the workUnder the following conditions:
* The copyright notice and license shall be included in all copies or substantial portions of the software.
* Any of the above conditions can be waived if you get permission from the copyright holder.See bundled MIT-LICENSE.txt file for detailed license terms.