Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pod spec & fix the user/password authentification #410

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions ASIHTTPRequest.podspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "ASIHTTPRequest",
"version": "1.8.2",
"summary": "Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone.",
"homepage": "http://allseeing-i.com/ASIHTTPRequest",
"authors": {
"Ben Copsey": "[email protected]"
},
"license": "New BSD License",
"source": {
"git": "https://github.com/pokeb/asi-http-request.git",
"tag": "v1.8.2"
},
"description": "\n ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that\n makes some of the more tedious aspects of communicating with web servers\n easier. It is written in Objective-C and works in both Mac OS X and iPhone\n applications.\n\n It is suitable performing basic HTTP requests and interacting with\n REST-based services (GET / POST / PUT / DELETE). The included\n ASIFormDataRequest subclass makes it easy to submit POST data and files\n using multipart/form-data.\n\n Please note that ASIHTTPRequest is not recommended for newer projects \n since it's not actively maintained anymore. \n For more info visit: http://allseeing-i.com/%5Brequest_release%5D\n ",
"requires_arc": false,
"subspecs": [
{
"name": "Core",
"source_files": "Classes/*.{h,m}",
"ios": {
"dependencies": {
"Reachability": [

]
},
"frameworks": [
"MobileCoreServices",
"CFNetwork",
"CoreGraphics"
]
},
"osx": {
"exclude_files": "**/*ASIAuthenticationDialog*",
"frameworks": [
"SystemConfiguration",
"CoreServices"
]
},
"libraries": "z.1"
},
{
"name": "ASIWebPageRequest",
"source_files": "Classes/ASIWebPageRequest/*.{h,m}",
"libraries": "xml2.2",
"xcconfig": {
"HEADER_SEARCH_PATHS": "\"$(SDKROOT)/usr/include/libxml2\""
},
"dependencies": {
"ASIHTTPRequest/Core": [

]
}
},
{
"name": "CloudFiles",
"source_files": [
"Classes/CloudFiles/*.{h,m}",
"Classes/S3/ASINSXMLParserCompat.h"
],
"dependencies": {
"ASIHTTPRequest/Core": [

]
}
},
{
"name": "S3",
"source_files": "Classes/S3/*.{h,m}",
"dependencies": {
"ASIHTTPRequest/Core": [

]
}
}
]
}
5 changes: 3 additions & 2 deletions Classes/ASIHTTPRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -2540,8 +2540,9 @@ - (NSMutableDictionary *)findCredentials
NSMutableDictionary *newCredentials = [[[NSMutableDictionary alloc] init] autorelease];

// First, let's look at the url to see if the username and password were included
NSString *user = [[self url] user];
NSString *pass = [[self url] password];
NSURLComponents *components = [NSURLComponents componentsWithURL:self.url resolvingAgainstBaseURL:NO];
NSString *user = components.user;
NSString *pass = components.password;

if (user && pass) {

Expand Down