multiwoven-integrations 0.15.4 → 0.15.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5817a11d56cc84e9f21a860c1a3569341618601b7e45adfb11d63c69cef56bad
|
4
|
+
data.tar.gz: de86e0f0cf8e03c2a502564c4433504069b8901351e19214cccd0024358146dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 128e2f06b1712097cf41f8b8e49d3724e4695fac476f606511d702c9eb1603dffd836e06c930032521a1579b3753fcd885b50f4c8f5889b180587690dedb50bc
|
7
|
+
data.tar.gz: d3541afb998b37338318843b402fd00c4d9a2ab83ce24e4efc6ab5e2bc92931c8dc16a3d04eeafdeb053253887ad5c7d3a4411d6e0dca664f924cee157c4efe9
|
@@ -7,12 +7,12 @@ module Multiwoven::Integrations::Source
|
|
7
7
|
def check_connection(connection_config)
|
8
8
|
connection_config = connection_config.with_indifferent_access
|
9
9
|
url_host = connection_config[:url_host]
|
10
|
+
http_method = connection_config[:http_method]
|
10
11
|
headers = connection_config[:headers]
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
)
|
12
|
+
payload = JSON.parse(connection_config[:request_format])
|
13
|
+
config = connection_config[:config]
|
14
|
+
config[:timeout] ||= 30
|
15
|
+
response = send_request(url_host, http_method, payload, headers, config)
|
16
16
|
if success?(response)
|
17
17
|
success_status
|
18
18
|
else
|
@@ -60,7 +60,7 @@ module Multiwoven::Integrations::Source
|
|
60
60
|
headers = connection_config[:headers]
|
61
61
|
config = connection_config[:config]
|
62
62
|
config[:timeout] ||= 30
|
63
|
-
response = send_request(url_host, payload, headers, config)
|
63
|
+
response = send_request(url_host, HTTP_POST, payload, headers, config)
|
64
64
|
process_response(response)
|
65
65
|
rescue StandardError => e
|
66
66
|
handle_exception(e, context: "HTTP MODEL:RUN_MODEL:EXCEPTION", type: "error")
|
@@ -75,10 +75,10 @@ module Multiwoven::Integrations::Source
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
def send_request(url, payload, headers, config)
|
78
|
+
def send_request(url, http_method, payload, headers, config)
|
79
79
|
Multiwoven::Integrations::Core::HttpClient.request(
|
80
80
|
url,
|
81
|
-
|
81
|
+
http_method,
|
82
82
|
payload: payload,
|
83
83
|
headers: headers,
|
84
84
|
config: config
|
@@ -8,15 +8,21 @@
|
|
8
8
|
"type": "object",
|
9
9
|
"required": ["url_host"],
|
10
10
|
"properties": {
|
11
|
+
"http_method": {
|
12
|
+
"type": "string",
|
13
|
+
"title": "HTTP Method",
|
14
|
+
"enum": ["POST", "GET"],
|
15
|
+
"order": 0
|
16
|
+
},
|
11
17
|
"url_host": {
|
12
18
|
"type": "string",
|
13
19
|
"title": "URL",
|
14
|
-
"order":
|
20
|
+
"order": 1
|
15
21
|
},
|
16
22
|
"headers": {
|
17
23
|
"title": "HTTP Headers",
|
18
24
|
"description": "Custom headers to include in the HTTP request. Useful for authentication, content type specifications, and other request metadata.",
|
19
|
-
"order":
|
25
|
+
"order": 2,
|
20
26
|
"additionalProperties": {
|
21
27
|
"type": "string"
|
22
28
|
}
|
@@ -33,21 +39,21 @@
|
|
33
39
|
"order": 0
|
34
40
|
}
|
35
41
|
},
|
36
|
-
"order":
|
42
|
+
"order": 3
|
37
43
|
},
|
38
44
|
"request_format": {
|
39
45
|
"title": "Request Format",
|
40
46
|
"description": "Sample Request Format",
|
41
47
|
"type": "string",
|
42
48
|
"x-request-format": true,
|
43
|
-
"order":
|
49
|
+
"order": 4
|
44
50
|
},
|
45
51
|
"response_format": {
|
46
52
|
"title": "Response Format",
|
47
53
|
"description": "Sample Response Format",
|
48
54
|
"type": "string",
|
49
55
|
"x-response-format": true,
|
50
|
-
"order":
|
56
|
+
"order": 5
|
51
57
|
}
|
52
58
|
}
|
53
59
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multiwoven-integrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subin T P
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|