Name: seven 2007-12-25 3:40
Hey, macfag here. Im writing a tool for the different chans for us fellow macfags, with Cocoa and XCode 3, but im having some trouble trying to figure out how to make a post to the boards. My idea was just to use a WebView, make it load up the board's front page
NSMutableURLRequest *urlRequest;
urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://img.4chan.org/b/"]];
[urlRequest setValue:@"http://img.4chan.org/b/" forHTTPHeaderField:@"Referer"];
[[webView mainFrame] loadRequest:urlRequest];
and just fill out the form with the DOM methods and submit the form, but for some reason it doesnt want to let me fill in the file upload form, which makes posting images impossible. Anyone know how to get this done? I'd like to avoid crafting my own HTTP request from scratch, thats alot of work to support all the different types of boards each chan has.
NSMutableURLRequest *urlRequest;
urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://img.4chan.org/b/"]];
[urlRequest setValue:@"http://img.4chan.org/b/" forHTTPHeaderField:@"Referer"];
[[webView mainFrame] loadRequest:urlRequest];
and just fill out the form with the DOM methods and submit the form, but for some reason it doesnt want to let me fill in the file upload form, which makes posting images impossible. Anyone know how to get this done? I'd like to avoid crafting my own HTTP request from scratch, thats alot of work to support all the different types of boards each chan has.