This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Using data serialization for client server communication | |
CPKeyedArchiver | |
CPKeyedArchiver is the easiest way to serialize your data into some string value for client/server communication (for example using CPURLRequest and CPURLConnection objects). | |
*/ | |
-(void) sendAsynchRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mac OS X Finder and whatnot | |
.DS_Store | |
# Sparkle distribution Private Key (Don't check me in!) | |
dsa_priv.pem | |
# XCode (and ancestors) per-user config (very noisy, and not relevant) | |
*.mode1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
equest URL:http://test.stocktwits.com/api/account/verify_credentials.json | |
Request Method:GET | |
Status Code:200 OK | |
Request Headers | |
Authorization:Basic YXBwbGV0ZXN0ZXI6YXBwbGV0ZXN0ZXI= | |
Cache-Control:no-cache | |
If-Modified-Since:Thu, 01 Jan 1970 00:00:00 GMT | |
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4 | |
X-Requested-With:XMLHttpRequest | |
X-St:true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+(void)updateAccount:(CPDictionary)accountParams delegate:(id)delegate | |
{ | |
var urlString = [CPString stringWithFormat:@"http://api.webservice.com/account/update.json"]; | |
var request = [self requestWithURLString:urlString]; | |
var name = [accountParams valueForKey:@"name"]; | |
var username = [accountParams valueForKey:@"username"]; | |
var email = [accountParams valueForKey:@"email"]; | |
var postBody = [CPString stringWithFormat:@"name=%@&username=%@&email=%@", name, username, email]; | |
[request setValue:[postBody length] forHTTPHeaderField:@"Content-Length"]; | |
[request setHTTPMethod:@"POST"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'uri' | |
#1: Simple POST | |
res = Net::HTTP.post_form(URI.parse('http://www.example.com/search.cgi'), | |
{'q'=>'ruby', 'max'=>'50'}) | |
puts res.body | |
#2: POST with basic authentication | |
res = Net::HTTP.post_form(URI.parse('http://jack:[email protected]/todo.cgi'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* STAttachedWindow.j | |
* stocktwits-desktop-2 | |
* | |
* Created by Daniel Brajkovic on 12/13/10. | |
* Copyright Witton Technology Group 2010. All rights reserved. | |
*/ | |
@import "TNAttachedWindow.j" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* More info at: http://phpjs.org | |
* http://phpjs.org/functions/index | |
* | |
* php.js is copyright 2009 Kevin van Zonneveld. | |
* Dual licensed under the MIT (MIT-LICENSE.txt) | |
* and GPL (GPL-LICENSE.txt) licenses. | |
* | |
* Conversion to Objective-J copyright 2009 Philippe Laval | |
* Licenced under the same MIT, GPL dual licences. |
OlderNewer