Skip to content

Fix uncompilable code of Java asynchttp - #169

Merged
reynolek merged 1 commit into
Kong:masterfrom
wtetsu:fix/uncompilable_java_asynchttp_code
Jul 22, 2020
Merged

Fix uncompilable code of Java asynchttp#169
reynolek merged 1 commit into
Kong:masterfrom
wtetsu:fix/uncompilable_java_asynchttp_code

Conversation

@wtetsu

@wtetsuwtetsu commented Jun 20, 2020

Copy link
Copy Markdown
Contributor

I noticed, java/asynchttp/custom-method.java is not compilable because there is no preparePropfind method.

AsyncHttpClientclient = newDefaultAsyncHttpClient();
client.preparePropfind("http://mockbin.com/har")

I unified code style from client.prepareMethod(url) to client.prepare("METHOD", url) because internal code of DefaultAsyncHttpClient is like this.

publicBoundRequestBuilderprepare(Stringmethod, Stringurl) {
returnthis.requestBuilder(method, url);
}
publicBoundRequestBuilderprepareGet(Stringurl) {
returnthis.requestBuilder("GET", url);
}
publicBoundRequestBuilderprepareConnect(Stringurl) {
returnthis.requestBuilder("CONNECT", url);
}
publicBoundRequestBuilderprepareOptions(Stringurl) {
returnthis.requestBuilder("OPTIONS", url);
}
publicBoundRequestBuilderprepareHead(Stringurl) {
returnthis.requestBuilder("HEAD", url);
}
publicBoundRequestBuilderpreparePost(Stringurl) {
returnthis.requestBuilder("POST", url);
}
publicBoundRequestBuilderpreparePut(Stringurl) {
returnthis.requestBuilder("PUT", url);
}
// ...

@reynolek
reynolek merged commit c5bc4d8 into Kong:masterJul 22, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@wtetsu@reynolek