Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin Http Request Code Generation #2516

Closed
seanghay opened this issue Aug 15, 2020 · 3 comments · Fixed by #2526
Closed

Kotlin Http Request Code Generation #2516

seanghay opened this issue Aug 15, 2020 · 3 comments · Fixed by #2526
Assignees

Comments

@seanghay
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, Insomnia could let us generate Java code. However, I am an Android developer, and I always wanted to generate Kotlin code instead of Java code for OkHttp request. Also, Kotlin now becomes one of the most popular languages.

Describe the solution you'd like
I have made a pull request to httpsnippet, but got no comments.

Describe alternatives you've considered
Even though Android Studio could convert Java code into Kotlin code, I think it'd be much nicer to have it.
There are quite a lot of cool HttpClient for Kotlin only such as fuel and ktor.

I'm planning to create those targets as well if my current pull request is merged.

@reynolek
Copy link
Contributor

Hey @seanghay! When I saw this issue I was reminded of the open PR for kong/httpsnippet which you also authored. Since Insomnia uses that library as well, I have merged that, and tomorrow I will deploy a new version of httpsnippet.

From there it would be fairly easy to just update https://github.com/Kong/insomnia/blob/17d31eeb507dddf0279ac150596245b7a06cfe43/packages/insomnia-send-request/package.json and https://github.com/Kong/insomnia/blob/1e424fc083dc91194406b59fe010cb84203c3c8b/packages/insomnia-app/package.json to that new version, if you wanted to take that on and open a PR once the new httpsnippet package is available.

@seanghay
Copy link
Contributor Author

Hey @seanghay! When I saw this issue I was reminded of the open PR for kong/httpsnippet which you also authored. Since Insomnia uses that library as well, I have merged that, and tomorrow I will deploy a new version of httpsnippet.

From there it would be fairly easy to just update 17d31ee/packages/insomnia-send-request/package.json and 1e424fc/packages/insomnia-app/package.json to that new version, if you wanted to take that on and open a PR once the new httpsnippet package is available.

Thank you @reynolek !

@reynolek
Copy link
Contributor

I have published 1.22.0 of httpsnippet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants