post

POST request returning null values

POST request returning null values Question: I’m trying to make some POST requests to a website and, while I get 200 responses every time I do so, the values of said responses are all either null or 0’s. I’ve tried using all the headers visible when inspecting the website, just a combination of them, insertint …

Total answers: 1

Django. POST request after reloading a page. Sign up form

Django. POST request after reloading a page. Sign up form Question: When user enters incorrect data in form, he gets errors. If after that user reloads a page, he gets the same page, the same form with the same fields, errors. I don’t know why after reloading a page request is POST. Every time after …

Total answers: 1

Django form. POST request

Django form. POST request Question: When user cannot log in(because he entered a wrong password for example) page reloads and shows that password incorrect, then, when user reloads page again, the same form with the same completed fields and with the same error will be generated on the page. Problem is, that somehow after reloading …

Total answers: 3

Put/Post errors while trying to access it from through python. "Bad Request. The JSON payload should be inside a root property called

Put/Post errors while trying to access it from through python. "Bad Request. The JSON payload should be inside a root property called Question: I am trying to post/put to Sheety via Python: SHEETY_URL = "https://api.sheety.co/gfhgfhjfdghjgfjf/flightDeals/prices/5" header = { "Content-Type" : "application/json" } params_sheety = { "price": { "iataCode": "PLN" } } response_sheety = requests.put(url=SHEETY_URL, params=params_sheety, …

Total answers: 1

Why is the Flask 'POST' method not working?

Why is the Flask 'POST' method not working? Question: I’m trying to create a small chatting platofrm on Flask. Nothing fancy, just an experiment. My problem is that flask doesn’t seem to be taking any input from my post statements, even though I get the message in the console. text = {"text":typed} #both userenter and …

Total answers: 1

Python Requests POST / Upload Image File

Python Requests POST / Upload Image File Question: How can I os.remove() this image after it has been uploaded? I believe that I need to close it somehow. import requests, os imageFile = "test.jpg" myobj = {‘key’: ‘key’, ‘submit’:’yes’} up = {‘fileToUpload’:(imageFile, open(imageFile, ‘rb’), ‘multipart/form-data’)} r = requests.post(‘https://website/uploadfile.php’, files=up, data = myobj) sendTo = r.text …

Total answers: 2

python file pass value to html with flask face Internal Server Error (jinja2.exceptions.TemplateNotFound: index.html)

python file pass value to html with flask face Internal Server Error (jinja2.exceptions.TemplateNotFound: index.html) Question: python file pass value to html with flask error Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.` import mysql.connector …

Total answers: 1

How to applying POST method using Python?

How to applying POST method using Python? Question: I have struggled with gettting bad response while I request POST method in Python. API DOCS : https://docs.wemix.com/v/en/dapp-developer/api-reference/account-apis#get-wemix-balance-for-a-single-address For example, body data is like data = { ‘addresses’: [ ‘0xaC45d8b7ED8bDCBaF5F59F4622F9B351CDb9E956’, ‘0x5b2d775cA52Ad27524e3581980D56694D9E1A83C’, ‘0xc000250d0CdFb43e2F5C03f6ea73807e0694e795’, ‘0x501226d260513C4B6f2Ef67B6213AF5A9e3cdC7B’, ‘0x779a605C753cea01d23D9BB7a5F961A8AF315011’, ‘0x8FEC9850DAd02AB726b6822927c8B402bC993d58’, ‘0xeFE753A89B5f1836A44744DF626F5E47eeDa18F7’, ‘0xf9F20C6dbaF7D70FCEADDDBD13d9Bcb6b66298DA’, ‘0x290Fa3FE65dF509cb27bA55b493841cB92DA083B’, ‘0x2ED5972f39109D1818024bF84Ce8F2230c4d99D9’, ‘0xbed789c6008f788a28fc222c83082d67033daf7f’, ‘0x1393bba2f90fe4d040bf70c24183dd6e27274de5’, ‘0xb93de30f956a03d8c597ba0c7a7d08cf4644a571’, ‘0xf68aed73c86127de4047533da58b419e1aca7c0a’ ] } I tried …

Total answers: 1

Different html page for POST and GET methods for the same app.route (Flask)

Different html page for POST and GET methods for the same app.route (Flask) Question: I am writing a program that randomizes a users lists of movies which is stored in a sql database. The code itself is unimportant for my question (I think) but I’ll still leave it just in case. As you see below, …

Total answers: 1

Timeout reading a post request containing heavy dictionnary

Timeout reading a post request containing heavy dictionnary Question: I am receiving a POST request containing a 3 mB Json dictionary. When i receive de POST, my view tries to read the args in the request but that causes a timeout on the Heroku server. When i try it locally, it works fine though. Here …

Total answers: 1