I am trying to post user details to create new user in the database using POJO classes. The API accepts raw JSON as post requests. The response that I am receiving is "Response{protocol=http/1.1, code=400, message=, url=my api url}" I am using POJO class CreateUser to create details for my user and passing it to Retrofit ..
Category : post

//This is the pay_data parameter {"amount":"10","quantity":"1","type":"Subs","pay_method":"FNB","reference":"Test Api payment"} Please help me with this. Source: Android..

I am getting 500 code error. Please answer this, Base url is http://aludashboard.co.bw/api/ I need to send image with data as shown in postman screenshot. Please try to provide me the answer. I have seen so many posts but I wasn’t able to understand so it would be if you try to solve and get ..
In our school project, we’re trying to create a login using a POST-request to our webserver in Android Studio, so we can check the username and password in our database etc. We’re, however, not very experienced in coding. We have this code to send data to our webserver. There are no problems while debugging, but ..
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); listView= findViewById(R.id.liste); String showUrl = "https://xxxxxxxx.php?password="; final JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, showUrl, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { System.out.println(response.toString()); try { String a, b, c; JSONArray showarray = response.getJSONArray("showarray"); final ArrayList<String> arrayListim = new ArrayList<String>(); final ArrayAdapter<String> adaptor = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1, arrayListim); for ..
I want to create an application that allows a user to get information about his environment depending on his location. So I use the onLocationChanged(Location loc) function However I read that publishing a location on a remote server, can take some time, and could eventually block the execution of onLocationChanged(Location loc) Here’s my code, I’m ..
I’m trying to call my server test using Fuel.post with the header {"Message", "test"}. if the request work well the server return my "message". here is my fragment : class FragmentAuthSignIn : Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { val v: View = inflater.inflate(R.layout.fragment_auth_sign_in, container, false) (v.BtnLogin as ..
I have a POST message I absolutely have to send on Android in a given circumstance, to the point I would like it to keep trying until it completes. I was under the understanding that setting: urlConnection.setConnectTimeout(0); would keep trying the connection until it goes through, but what is actually happening is the try block ..
for days now I’ve been trying to get a valid post response in my app using retrofit. My friend told me about postman and funilly enough, I got it right the first time. Link to postman response This is the response I want, but I cant seem to do it in retrofit. Sadly, I am ..
I am trying to set the date of a post in the firebase database in a "Text View", but I am having difficulties. Note: I am using RecyclerView. This is a part of my code in CommentAdapter public void onBindViewHolder(@NonNull final CommentAdapter.ImageViewHolder holder, final int position) { firebaseUser = FirebaseAuth.getInstance().getCurrentUser(); final Comment comment = mComment.get(position); ..
Recent Comments