T
T
Thymomenos Gata2018-05-05 01:07:20
Java
Thymomenos Gata, 2018-05-05 01:07:20

How to send information to the server?

The question is, if it’s clear how to receive information from the database on the server, we pass a get request with parameters, where the parameters are processed and sent back (although I have problems with receiving data on the client, but this is not about that now).
How to send information to the database if the post request implies (as I understand it) that we have a form that we fill out and we need to use the body () annotation.
Can I put a request not to update the information, but to create a new one?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mitaichik, 2018-05-05
@prumin

I don't think you're interested in submitting web forms.
Send data in JSON format using the POST (create) or PUT (modify) method. From the Android side, Retrofit would be the best solution. Well, the server is your choice. Most frameworks already have built-in support for the REST API - it's better to use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question