Post request example

App version: 2.27.2__________
Phone OS: Iphone X________
Problem description:

Im trying to make a POST request on a https website. In postman I can get everything to work for example I would request:

Login_auth: test
Pass_auth: test
Command: test

After the request it will say that my records are inserted in the database. When I try to do the same in the Olisto app I don’t get any errors but the database values are NULL NULL NULL.

Can anyone make an example of how to type it out in the app? I’m not using a content type.

So far I put my url like so: https://www.something.yup/test.php
ofcourse not th real url.

Hello Jos, what does you content look like, and what settings/content-type do you use in Postman to make it work?
Whatever you enter in the ‘request body’ field will be sent to the server exactly as you enter it, so you will have to make sure it conforms to what your server expects. How that looks completely depends on how you implemented your server. However it’s pretty uncommon not to use any content-type. Most of the possibilities in Postman will also lead to a content-type being set.
It would also be useful to look at any errors your server might be logging, or perhaps add some checks and logging if there are none.

Here is an example using form-urlencoded (application/x-www-form-urlencoded) format:


This would be a similar example for a JSON-body:


However neither will usually work without correctly setting the content-type.

YES, that worked. thank you :slight_smile:

I used the urlencoded format and now I got some test test test in the database instead of NULL :stuck_out_tongue: I knew it had to do with the way it needed to be typed.

I can continue making my door lock and unlock automaticly ^^

It’s very barebone. It should only comply with good secure information exchange so I used https and a POST request with some login parameters. I am yet to implement a timeout on wrong attempts though. I like trowing my self in the deep and am able to get away with it (slow but steady)

thank you for helping :slight_smile:

1 Like

Dit topic is na 14 dagen automatisch gesloten. Nieuwe antwoorden zijn niet meer toegestaan.