Closed daniel-chan closed 5 years ago
Hi @daniel-chan,
I wonder if you might be pulling in an earlier version of org.apache.httpcomponents:httpclient
. The post
method was added to RequestBuilder
in version 4.4 of this dependency. Do you have this dependency specified in your build.gradle
or pom.xml
already?
public static void test() throws Exception { NexmoClient client = new NexmoClient(new JWTAuthMethod( "e1e8bf22-c728-44fa-9a9c-4863ca7409ab", FileSystems.getDefault().getPath("D:\private.key") ));
call this method ,result exception as below: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.http.client.methods.RequestBuilder.post(Ljava/lang/String;)Lorg/apache/http/client/methods/RequestBuilder; at com.nexmo.client.voice.endpoints.CreateCallMethod.makeRequest(CreateCallMethod.java:54) at com.nexmo.client.voice.endpoints.CreateCallMethod.makeRequest(CreateCallMethod.java:40) at com.nexmo.client.voice.endpoints.AbstractMethod.execute(AbstractMethod.java:81) at com.nexmo.client.voice.endpoints.CallsEndpoint.post(CallsEndpoint.java:64) at com.nexmo.client.voice.VoiceClient.createCall(VoiceClient.java:69)