This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/microsoft/bot/ai/luis Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8686 <artifactId >json</artifactId >
8787 <version >20190722</version >
8888 </dependency >
89- <dependency >
90- <groupId >org.apache.httpcomponents</groupId >
91- <artifactId >httpcore</artifactId >
92- <version >4.4.13</version >
93- <scope >compile</scope >
94- </dependency >
95- <dependency >
96- <groupId >org.apache.httpcomponents</groupId >
97- <artifactId >httpclient</artifactId >
98- <version >4.5.13</version >
99- <scope >compile</scope >
100- </dependency >
10189 </dependencies >
10290
10391 <profiles >
Original file line number Diff line number Diff line change 33
44package com .microsoft .bot .ai .luis ;
55
6- import org .apache .http .NameValuePair ;
7- import org .apache .http .client .utils .URIBuilder ;
6+ import okhttp3 .HttpUrl ;
87import java .net .MalformedURLException ;
98import java .net .URISyntaxException ;
109import java .net .URL ;
@@ -168,11 +167,9 @@ private void parse(String applicationEndpoint) {
168167 }
169168
170169 try {
171-
172- String endpointKeyParsed = new URIBuilder ( applicationEndpoint ). getQueryParams ( )
170+ String endpointKeyParsed = HttpUrl . parse ( applicationEndpoint )
171+ . queryParameterValues ( "subscription-key" )
173172 .stream ()
174- .filter (param -> param .getName ().equalsIgnoreCase ("subscription-key" ))
175- .map (NameValuePair ::getValue )
176173 .findFirst ()
177174 .orElse ("" );
178175
You can’t perform that action at this time.
0 commit comments