Comments (4)
I found out by my self , it's good to support it when you publish a framework ... some body should waste his time to edit library .
from vox.
I found out by my self , it's good to support it when you publish a framework ... some body should waste his time to edit library .
Perhaps you can provide some example code on your approach?
from vox.
I found out by my self , it's good to support it when you publish a framework ... some body should waste his time to edit library .
Perhaps you can provide some example code on your approach?
of course.
I'll put example in next comment 👍
from vox.
In your project Go to Pods folder, open Vox.
Open JSONAPIClient_Alamofire.swift which module that all requests handles there .
In function executeRequest(...) add this part of code :
/// Configure the trust policy manager let serverTrustPolicy = ServerTrustPolicy.pinCertificates( certificates: ServerTrustPolicy.certificates(), validateCertificateChain: false, validateHost: true)
let serverTrustPolicies = ["yourhost.com": serverTrustPolicy]
let serverTrustPolicyManager = ServerTrustPolicyManager(policies: serverTrustPolicies)
let url = baseURL.appendingPathComponent(path)
let headers: HTTPHeaders = [ "Content-Type": "application/vnd.api+json", "Accept": "application/vnd.api+json", "Authorization": "token"]
/// using certificate pinning
let sessionManager = SessionManager(configuration: URLSessionConfiguration.default,serverTrustPolicyManager: serverTrustPolicyManager)
let request = multiEncodedURLRequest(url: url, method: method, queryItems: queryItems, bodyParameters: bodyParameters, headers: headers)
And when request sent, in responseData call back do
let _ = sessionManager
base on this link : https://stackoverflow.com/questions/39984880/alamofire-result-failure-error-domain-nsurlerrordomain-code-999-cancelled
from vox.
Related Issues (20)
- JSONAPI error handling HOT 1
- Library not compatible with iOS 10 HOT 1
- Allow basic Alamofire client to be subclassed
- Request::execute is throwable but does not throw
- Allow ErrorObject to be stringified
- Relationship object not deserialized HOT 8
- relationship subset
- Filtering Objects
- Links field missing from Resource.swift HOT 1
- Pagination struct is not visible HOT 1
- Relationships missing on deserialization HOT 4
- Creating Resource - Issue unwrapping response HOT 1
- Exception: EXC_BAD_INSTRUCTION When accessing nested relationship HOT 1
- Relationships not deserialize
- initializer
- Write functions just on time
- Won't build keep getting same error "Must override `static var resourceType: String`:"
- Context handling error response as unknown incorrectly. HOT 1
- Set meta in the resource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vox.