I have created a simple website wherein i have a form. Upon entering the form data my code creates a dictionary with the key value pairs.
i have printed the dictionary out successfully in pycharm, but my confusion is how to send this data over to postman as a post request.
the basic syntax i am using is:
response=requests.post(add_url, json=data)
however, it doesn’t seem to be playing ball!
in postman the post request key values are “x-www-form-urlencoded”.
This is the first time i’ve worked independently with postman, so excuse me if i’m not explaining myself very clearly.
I know for a fact that the data is being collated from the form (as it prints out), and also i am able to retrieve data from the api… just can’t add it!
i just need to know why postman isn’t receiving the data from the form in the website (data is being collected AND the postman works when i enter data to it on the windows app). i just can’t seem to post the the requests from the website to postman. really frustrating.
no… all i want to do is send postman new data so that updates the api.
ie… every time i enter new data in the form on the website, it should send the post request. i might be missing the point here, i’ll hold my hands up and admit defeat if i am, but what’s the point in a restful api if you can’t send request posts to it?
excuse any misunderstandings i have… it’s a whole new world to me!
cheers