Comments (5)
In the code above, this won't be the default behaviour. It relies on the user explictly setting a function parameter, which defaults to false. This mirrors the behaviour of the JavaScript SDK.
Sorry read your comment again, I think I missed it the first time.
The default behavior for what ever reason today (ie. 3.1.1) _Whisk class API is blocking: Bool = true
different from the JavaScript SDK.
https://github.com/apache/incubator-openwhisk-runtime-swift/blob/master/core/swift3.1.1Action/spm-build/_Whisk.swift#L23
class func invoke(actionNamed action : String, withParameters params : [String:Any], blocking: Bool = true) -> [String:Any] {
It would be good to have consistency with theJavaScript SDK, but I think is more important to not break people's code by changing the API when they move from swift 3 to swift4.
I think it's something to note when we get to building new Library/SDK for swift4+ both client and server, and maybe a new Class OpenWhisk
, then I think will have an opportunity to change the API to invoke
from openwhisk-runtime-swift.
Thanks for opening this.
I thought I already opened an issue to document my findings.
For swift 4 we plan to use urlSession.
Ignoring SSL is not a good thing, so the library should not be supporting this.
I made the SDK to allow to take an override to APIHOST, by allowing the user to specify a baseURL.
In this baseURL user can specify the Whisk API using http
instead of https
This allowed me to write test to pass in Travis.
I production system WHISK APIHOST will always be https with valid certificates.
I opened issue #11 and will plan to work on it.
We can leave this issue open until linux supports self sign certs, and then allow an override in the Class to skip ssl checks, but should not be the default.
from openwhisk-runtime-swift.
Here is an example
//Overriding WHISK API HOST using baseUrl, only applicable in testing with self sign ssl certs"
Whisk.baseUrl = "http://172.17.0.1:10001"
let invokeResult = Whisk.invoke(actionNamed: "/whisk.system/utils/date", withParameters: [:], blocking: false)
from openwhisk-runtime-swift.
In the code above, this won't be the default behaviour. It relies on the user explictly setting a function parameter, which defaults to false. This mirrors the behaviour of the JavaScript SDK.
from openwhisk-runtime-swift.
Yep that correct it would no be the default.
Default behavior is that user coding the action doesnโt have to worry the environment variable with APIHOST will be use they donโt have to specify baseURL
from openwhisk-runtime-swift.
Related Issues (20)
- Update Swift to 5.1.4
- Enable Swift SDK testing in GitHub Action CI runs
- Some source files miss Apache license headers HOT 1
- Fix codable escaping for result handler
- update image to latest GA release of Swift 4.1
- Update swift runtime to push master tag to Docker from Travis build
- Rename "license" subdir. to "licenses" to conform to other project repos. HOT 2
- What is the license of ibmcom/swift-ubuntu:3.1.1 HOT 2
- Swift 4.1 issue discovered around Structs with two Strings HOT 4
- Travis build failure openwhisk-admin-tools dependency not found HOT 1
- build swift41Action failed in my local HOT 2
- Swift 3.1.1 runtime fails for large input HOT 3
- Async Swift Action and Promise/Future HOT 1
- Define Swift development experience HOT 1
- travis failing to build swift 4 image
- Swift 3.1.1 image fails to build due to timeout HOT 1
- Provide Swift 4.2 runtime ๐ HOT 5
- Feature Request: Pg/MySQL/SQLite HOT 1
- Build is failing due to using `latest` image. HOT 1
- Support Swift 5 HOT 2
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 openwhisk-runtime-swift.