Permalink
Browse files

making an actual request

  • Loading branch information...
1 parent b40ea66 commit 9f98966e1dd813c32f1227e8a2a94fcb1b587eb6 Kevin Beddingfield committed May 23, 2012
@@ -19,6 +19,7 @@
3EC1422E1537F8D300B96E46 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EC142081537F8D200B96E46 /* Cocoa.framework */; };
3EC142361537F8D300B96E46 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3EC142341537F8D300B96E46 /* InfoPlist.strings */; };
3EC142391537F8D300B96E46 /* CurlyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC142381537F8D300B96E46 /* CurlyTests.m */; };
+ 3EC1424815636E6F00B96E46 /* CurlyController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC1424715636E6F00B96E46 /* CurlyController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -53,6 +54,8 @@
3EC142351537F8D300B96E46 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3EC142371537F8D300B96E46 /* CurlyTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CurlyTests.h; sourceTree = "<group>"; };
3EC142381537F8D300B96E46 /* CurlyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CurlyTests.m; sourceTree = "<group>"; };
+ 3EC1424615636E6F00B96E46 /* CurlyController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurlyController.h; sourceTree = "<group>"; };
+ 3EC1424715636E6F00B96E46 /* CurlyController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CurlyController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -124,6 +127,8 @@
3EC142201537F8D300B96E46 /* MainMenu.xib */,
3EC142231537F8D300B96E46 /* CurlyDocument.xcdatamodeld */,
3EC1420F1537F8D200B96E46 /* Supporting Files */,
+ 3EC1424615636E6F00B96E46 /* CurlyController.h */,
+ 3EC1424715636E6F00B96E46 /* CurlyController.m */,
);
path = Curly;
sourceTree = "<group>";
@@ -271,6 +276,7 @@
3EC142151537F8D200B96E46 /* main.m in Sources */,
3EC1421C1537F8D200B96E46 /* CurlyDocument.m in Sources */,
3EC142251537F8D300B96E46 /* CurlyDocument.xcdatamodeld in Sources */,
+ 3EC1424815636E6F00B96E46 /* CurlyController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -452,6 +458,7 @@
3EC1423E1537F8D300B96E46 /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
3EC1423F1537F8D300B96E46 /* Build configuration list for PBXNativeTarget "CurlyTests" */ = {
isa = XCConfigurationList;
@@ -460,6 +467,7 @@
3EC142411537F8D300B96E46 /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
View
@@ -0,0 +1,13 @@
+//
+// CurlyController.h
+// Curly
+//
+// Created by Kevin Beddingfield on 5/15/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface CurlyController : NSObject
+
+@end
View
@@ -0,0 +1,13 @@
+//
+// CurlyController.m
+// Curly
+//
+// Created by Kevin Beddingfield on 5/15/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "CurlyController.h"
+
+@implementation CurlyController
+
+@end
View
@@ -9,5 +9,8 @@
#import <Cocoa/Cocoa.h>
@interface CurlyDocument : NSPersistentDocument
+@property (weak) IBOutlet NSTextField *url;
+- (IBAction)go:(NSButton *)sender;
+@property (weak) IBOutlet NSPopUpButton *method;
@end
View
@@ -3,12 +3,15 @@
// Curly
//
// Created by Kevin Beddingfield on 4/12/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+// Copyright (c) 2012 Kevin Beddingfield. All rights reserved.
//
#import "CurlyDocument.h"
+
@implementation CurlyDocument
+@synthesize method;
+@synthesize url;
- (id)init
{
@@ -37,4 +40,13 @@ + (BOOL)autosavesInPlace
return YES;
}
+- (IBAction)go:(NSButton *)sender {
+ NSURL *urlFromTextField = [NSURL URLWithString:[url stringValue]];
+ NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:urlFromTextField];
+ [req setHTTPMethod:[method stringValue]];
+ NSError *requestError;
+ NSURLResponse *urlResponse = nil;
+ [NSURLConnection sendSynchronousRequest:req returningResponse:&urlResponse error:&requestError];
+
+}
@end
View
@@ -1,29 +1,30 @@
-{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
-\paperw9840\paperh8400
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+\vieww9600\viewh8400\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
\f0\b\fs24 \cf0 Engineering:
\b0 \
- Some people\
+ Kevin Beddingfield\
\
\b Human Interface Design:
\b0 \
- Some other people\
+ Kevin Beddingfield\
\
\b Testing:
\b0 \
- Hopefully not nobody\
+ Kevin Beddingfield\
\
\b Documentation:
\b0 \
- Whoever\
+ Kevin Beddingfield\
\
\b With special thanks to:
\b0 \
- Mom\
-}
+ Jayme Beddingfield\
+}
Oops, something went wrong.

0 comments on commit 9f98966

Please sign in to comment.