microsoft_kiota_faraday 0.13.0 → 0.14.0
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: f578ca1ba0645ad59b24a6487c383b351eb016ec9d39c860ae4e04bdde229fdd
|
4
|
+
data.tar.gz: 791230af8f46ce2bb510ad00a973580f97073c4a9aa2f0a95943d4b97a492a7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17e3764eff9ceade43ab88d8011651803587ce3352ba8cf7538ed8b0636c59c2a9b7736ae731f13e4426be1553f33180ba50f5bca67053035c8d91b8aa2a65e0
|
7
|
+
data.tar.gz: 5e0adce35b9732ee8e45c0c5cf21109c0b9c48c1ba8bd58251fcd57d5627c168e7eecc7e376b39d20bcfdece9ba2836b9a2fbcc58fd6db148d56a6dfcfbd76e3
|
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
11
11
|
|
12
12
|
### Changed
|
13
13
|
|
14
|
+
## [0.14.0] - 2024-02-14
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
|
18
|
+
- Make sure the base_url is set when calling authenticate_request. [#27](https://github.com/microsoft/kiota-http-ruby/pull/27)
|
19
|
+
|
14
20
|
## [0.13.0] - 2024-02-05
|
15
21
|
|
16
22
|
### Changed
|
@@ -9,7 +9,7 @@ module MicrosoftKiotaFaraday
|
|
9
9
|
include MicrosoftKiotaAbstractions::RequestAdapter
|
10
10
|
|
11
11
|
attr_accessor :authentication_provider, :content_type_header_key, :parse_node_factory, :serialization_writer_factory, :client
|
12
|
-
|
12
|
+
|
13
13
|
def initialize(authentication_provider, parse_node_factory=MicrosoftKiotaAbstractions::ParseNodeFactoryRegistry.default_instance, serialization_writer_factory=MicrosoftKiotaAbstractions::SerializationWriterFactoryRegistry.default_instance, client = KiotaClientFactory::get_default_http_client)
|
14
14
|
|
15
15
|
if !authentication_provider
|
@@ -21,7 +21,7 @@ module MicrosoftKiotaFaraday
|
|
21
21
|
if @parse_node_factory.nil?
|
22
22
|
@parse_node_factory = MicrosoftKiotaAbstractions::ParseNodeFactoryRegistry.default_instance
|
23
23
|
end
|
24
|
-
@serialization_writer_factory = serialization_writer_factory
|
24
|
+
@serialization_writer_factory = serialization_writer_factory
|
25
25
|
if @serialization_writer_factory.nil?
|
26
26
|
@serialization_writer_factory = MicrosoftKiotaAbstractions::SerializationWriterFactoryRegistry.default_instance
|
27
27
|
end
|
@@ -49,6 +49,7 @@ module MicrosoftKiotaFaraday
|
|
49
49
|
raise StandardError, 'factory cannot be null' unless factory
|
50
50
|
|
51
51
|
Fiber.new do
|
52
|
+
set_base_url_for_request_information(request_info)
|
52
53
|
@authentication_provider.authenticate_request(request_info).resume
|
53
54
|
request = self.get_request_from_request_info(request_info)
|
54
55
|
response = @client.run_request(request.http_method, request.path, request.body, request.headers)
|
@@ -92,7 +93,7 @@ module MicrosoftKiotaFaraday
|
|
92
93
|
end
|
93
94
|
|
94
95
|
def get_request_from_request_info(request_info)
|
95
|
-
request_info
|
96
|
+
set_base_url_for_request_information(request_info)
|
96
97
|
case request_info.http_method
|
97
98
|
when :GET
|
98
99
|
request = @client.build_request(:get)
|
@@ -118,7 +119,7 @@ module MicrosoftKiotaFaraday
|
|
118
119
|
request.path = request_info.uri
|
119
120
|
unless request_info.headers.nil? then
|
120
121
|
request.headers = Faraday::Utils::Headers.new
|
121
|
-
request_info.headers.get_all.select{|k,v|
|
122
|
+
request_info.headers.get_all.select{|k,v|
|
122
123
|
if v.kind_of? Array then
|
123
124
|
request.headers[k] = v.join(',')
|
124
125
|
elsif v.kind_of? String then
|
@@ -151,10 +152,16 @@ module MicrosoftKiotaFaraday
|
|
151
152
|
def convert_to_native_request_async(request_info)
|
152
153
|
raise StandardError, 'request_info cannot be null' unless request_info
|
153
154
|
return Fiber.new do
|
155
|
+
set_base_url_for_request_information(request_info)
|
154
156
|
@authentication_provider.authenticate_request(request_info).resume
|
155
157
|
return self.get_request_from_request_info(request_info)
|
156
158
|
end
|
157
159
|
end
|
158
160
|
|
161
|
+
private
|
162
|
+
|
163
|
+
def set_base_url_for_request_information(request_info)
|
164
|
+
request_info.path_parameters['baseurl'] = @base_url
|
165
|
+
end
|
159
166
|
end
|
160
167
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microsoft_kiota_faraday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: microsoft_kiota_abstractions
|