0

First of all I apologize if this question is not relevant. It's not code at all, nor do I post any questions about code snippets.

I create this thread, because I need to create an EndPoint in java that receives POST and GET requests from a small software in kotlin. The problem I have is that I can't use MVC structure or frameworks so I can't use spring boot. I have been looking for information and have found that with java.net.URL and have seen some examples that both POST and GET requests can be received. What I intend to do is that my kotlin app updates and creates records in the DB, but I don't just want it to do it locally in a SQLITE DB, I need to do something different between DBs because my app will be able to update data from its account and those account data they can be viewed from a web application with Laravel and can also be modified.

Please, could someone guide me on how to do this?

UPDATE: this Endpoint will be installed in server, and received petition from app kotlin. My endpoint updated central DB, and wil updated my SQLITE db with user it´s logged. I can´t use web application... i need use my endpoint with java. I think that i can use java.net.URL but never use it.

Thank you and regards

daviserraalonso
  • 75
  • 1
  • 13
  • need clarification. is it a standalone application that can be installed on multiple machines? Do you want to call external HTTP APIs? Have you looked at `HttpClient`, or `OkHttpClient`? – sidgate Nov 04 '22 at 07:53
  • @sidgate i updated my question with many information. My problem it´s that never build this apps and i don´t know to do... if you have any tutorial or link – daviserraalonso Nov 04 '22 at 08:05
  • still not clear. are you saying that you will build a webserver with HTTP endpoints in java, that will store data in SQLite? And kotlin app will call this API endpoint? Better tell your functional requirement, like, what are you trying to achieve? – sidgate Nov 04 '22 at 08:50
  • @sidgate yes my app kotlin call to my endpoint java and this endpoint to do all operations – daviserraalonso Nov 04 '22 at 08:51
  • so what is this question about? Is it about how to call HTTP endpoint from Kotlin? Or how to build a webserver in Java without any framework? – sidgate Nov 04 '22 at 08:52
  • @sidgate how to build a webserver in Java without any framework. What it´s the better solution to do this – daviserraalonso Nov 04 '22 at 08:53
  • in that case @Ascendise 's comment should help – sidgate Nov 04 '22 at 08:57
  • @sidgate and Ascendise thanks for your recomendations – daviserraalonso Nov 04 '22 at 09:03

0 Answers0