api_sabeq_ps_v1 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/api_sabeq_ps_v1/sabeq_helpers.rb +3 -6
- data/lib/api_sabeq_ps_v1/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a6a440f7e8db92a7361e1eea6b52773608e286243ef3eb57662ee8eacfa936c
|
4
|
+
data.tar.gz: 251bdc290a918c11f08e0e1c7fa26257e6b3e7379d31892f784369978603aef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 726dec151f9a79496e540ecb2a95903cf8cf03aebed56cf1a43a5c0af59b9dbf154a44bf373131a863cdff5af34cbb1ce818c1b09d2a0d158442bf3c28e6cb66
|
7
|
+
data.tar.gz: ca0808f59b919cb7b8c2ac28ab85ffebee39c0fbd8ef2a11f98ef151b91e4b2b4e7c4d19a0b393df937b2ef65131169c6d5608cfdbc9817f3ba3441c34988622
|
@@ -4,8 +4,7 @@ require "net/https"
|
|
4
4
|
module ApiSabeqPsV1
|
5
5
|
module SabeqHelpers
|
6
6
|
REQUEST_HEADER = {'Content-Type' => 'application/json'}
|
7
|
-
|
8
|
-
SABEQ_URL = "https://localhost:3001/"
|
7
|
+
SABEQ_URL = "https://sabeq.ps"
|
9
8
|
|
10
9
|
# Authorize the request
|
11
10
|
# parameters: login_token
|
@@ -69,8 +68,7 @@ module ApiSabeqPsV1
|
|
69
68
|
def make_post_request(url_link, json_content)
|
70
69
|
uri = URI.parse(url_link)
|
71
70
|
http = Net::HTTP.new(uri.host, uri.port)
|
72
|
-
|
73
|
-
http.use_ssl = false
|
71
|
+
http.use_ssl = true
|
74
72
|
a_request = Net::HTTP::Post.new(uri.request_uri, REQUEST_HEADER)
|
75
73
|
a_request.body = json_content.to_json
|
76
74
|
a_response = http.request(a_request)
|
@@ -80,8 +78,7 @@ module ApiSabeqPsV1
|
|
80
78
|
def make_get_request(url_link, json_content)
|
81
79
|
uri = URI.parse(url_link)
|
82
80
|
http = Net::HTTP.new(uri.host, uri.port)
|
83
|
-
|
84
|
-
http.use_ssl = false
|
81
|
+
http.use_ssl = true
|
85
82
|
the_params = json_content
|
86
83
|
uri.query = URI.encode_www_form(the_params)
|
87
84
|
a_request = Net::HTTP::Get.new(uri.request_uri)
|