Skip to content
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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Xcode
#
build/
DerivedData/

*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -17,3 +19,11 @@ DerivedData
*.ipa
*.xcuserstate
.DS_Store


### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
20 changes: 9 additions & 11 deletions ELWebService.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
TargetAttributes = {
17088ED01C5010EA007ADE1B = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0920;
LastSwiftMigration = 1020;
};
179C5C5D1AB079980047169F = {
CreatedOnToolsVersion = 6.3;
Expand All @@ -288,10 +288,11 @@
};
buildConfigurationList = 179C5C581AB079980047169F /* Build configuration list for PBXProject "ELWebService" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 179C5C541AB079980047169F;
productRefGroup = 179C5C5F1AB079980047169F /* Products */;
Expand Down Expand Up @@ -407,8 +408,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "ELWebServiceTests/ELWebServiceTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -422,8 +422,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.electrode.ELWebServiceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "ELWebServiceTests/ELWebServiceTests-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down Expand Up @@ -555,7 +554,7 @@
PRODUCT_NAME = ELWebService;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -576,7 +575,7 @@
PRODUCT_NAME = ELWebService;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down Expand Up @@ -712,7 +711,7 @@
PRODUCT_NAME = ELWebService;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = QADeployment;
};
Expand All @@ -727,8 +726,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "ELWebServiceTests/ELWebServiceTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = QADeployment;
};
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ELWebService is an HTTP framework for Swift built on Foundation's `URLSession`.

## Requirements

ELWebService requires Swift 4 and Xcode 9.2.
ELWebService requires Swift 5 and Xcode 10.2.

## Installation

Expand Down
8 changes: 4 additions & 4 deletions Source/Core/Request.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ public struct Request {
The HTTP header fields of the request. Each key/value pair represents a
HTTP header field value using the key as the field name.
*/
internal(set) var headers = [String : String]()
var headers = [String : String]()

/// The cache policy of the request. See NSURLRequestCachePolicy.
internal(set) var cachePolicy = NSURLRequest.CachePolicy.useProtocolCachePolicy
var cachePolicy = NSURLRequest.CachePolicy.useProtocolCachePolicy

/// The type of parameter encoding to use when encoding request parameters.
public var parameterEncoding = ParameterEncoding.percent {
Expand All @@ -170,13 +170,13 @@ public struct Request {
}

/// The HTTP `Content-Type` header field value of the request.
internal(set) var contentType: String? {
var contentType: String? {
set { headers[Headers.contentType] = newValue }
get { return headers[Headers.contentType] }
}

/// The HTTP `User-Agent` header field value of the request.
internal(set) var userAgent: String? {
var userAgent: String? {
set { headers[Headers.userAgent] = newValue }
get { return headers[Headers.userAgent] }
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>6.7.0</string>
<string>6.8.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down