api_demo_v1 0.1.4 → 0.1.5
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_demo_v1/sabeq_helpers.rb +4 -4
- data/lib/api_demo_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: b1012927e2c1fad2f421b84571ffa8b33b85997062a907c6ae36a9f76c2d1c08
|
4
|
+
data.tar.gz: ce2191ff02621b2b3e1204e1212d0e4333cb84102e4929a57a31521c846fffb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57a3c2bd5a9fffd6b1f303d3704f3dd899d865a4d5f0021ff4e493e6cf36d4a47f98ebbc8ff497cdbc1af628bc46728d0f201cf1535a0244369761f149ca4bd5
|
7
|
+
data.tar.gz: 63fe6fdf89ce60abed564474cd1469bc5efe726077434dd1757ba3bd2a7dc729728ee0273a4fb03193f0a3b88aa3adcb5e27d35dcbb9735aa944ec7b83fb64e2
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "net/http"
|
2
2
|
require "net/https"
|
3
3
|
|
4
|
-
module
|
4
|
+
module ApiDemoV1
|
5
5
|
module SabeqHelpers
|
6
6
|
REQUEST_HEADER = {'Content-Type' => 'application/json'}
|
7
|
-
SABEQ_URL = "https://
|
7
|
+
SABEQ_URL = "https://localhost:3001/"
|
8
8
|
|
9
9
|
# Authorize the request
|
10
10
|
# parameters: login_token
|
@@ -95,7 +95,7 @@ module ApiSabeqPsV1
|
|
95
95
|
def make_post_request(url_link, json_content)
|
96
96
|
uri = URI.parse(url_link)
|
97
97
|
http = Net::HTTP.new(uri.host, uri.port)
|
98
|
-
http.use_ssl =
|
98
|
+
http.use_ssl = false
|
99
99
|
a_request = Net::HTTP::Post.new(uri.request_uri, REQUEST_HEADER)
|
100
100
|
a_request.body = json_content.to_json
|
101
101
|
a_response = http.request(a_request)
|
@@ -105,7 +105,7 @@ module ApiSabeqPsV1
|
|
105
105
|
def make_get_request(url_link, json_content)
|
106
106
|
uri = URI.parse(url_link)
|
107
107
|
http = Net::HTTP.new(uri.host, uri.port)
|
108
|
-
http.use_ssl =
|
108
|
+
http.use_ssl = false
|
109
109
|
the_params = json_content
|
110
110
|
uri.query = URI.encode_www_form(the_params)
|
111
111
|
a_request = Net::HTTP::Get.new(uri.request_uri)
|
data/lib/api_demo_v1/version.rb
CHANGED