post

How to deal with "HTTP ERROR 403 No valid crumb was included in the request" Jenkins?

How to deal with "HTTP ERROR 403 No valid crumb was included in the request" Jenkins? Question: I try to abort Jenkins job build using python requests. This is my python code: crumb_value = ( requests.get(f"https://{usr}:{psw}@<jenkins url>/crumbIssuer/api/json", verify=False)).json()["crumb"] jenkins_abort = requests.post(f"https://{usr}:{psw}@<job url>/stop", json={‘Jenkins-Crumb’: crumb_json}, verify=False) So firstly I use Get request to get crumb value …

Total answers: 2

POST request gets blocked on Python backend. GET request works fine

POST request gets blocked on Python backend. GET request works fine Question: I am building a web app where the front-end is done with Flutter while the back-end is with Python. GET requests work fine while POST requests get blocked because of CORS, I get this error message: Access to XMLHttpRequest at ‘http://127.0.0.1:8080/signal’ from origin …

Total answers: 3

Signature does not match – POST HTTP Request to BingX API with Python

Signature does not match – POST HTTP Request to BingX API with Python Question: I’m trying to communicate with an API of a Tradingplatform via post requests in Python. Unfortunately, this only works if the request does not have to be signed. At the beginning I just wanted to follow the example of the documentation …

Total answers: 3

How to post an image file with a list of strings using FastAPI?

How to post an image file with a list of strings using FastAPI? Question: I have tried a lot of things, but it doesn’t seem to work. Here is my code: @app.post("/my-endpoint") async def my_func( languages: List[str] = ["en", "hi"], image: UploadFile = File(…) ): The function works fine when I remove one of the …

Total answers: 2

FastAPI: can I use Depends() for parameters in a POST, too?

FastAPI: can I use Depends() for parameters in a POST, too? Question: Overview I have created a class-based dependency, similar to what is in the amazing FastAPI tutorial. Problem It works, except that the parameters in the dependency (the Depends() portion) are passed as query parameters, meaning that they are part of the URI/URL. I …

Total answers: 2

How to trigger a Azure Function with parameters from a POST request

How to trigger a Azure Function with parameters from a POST request Question: I need to send a POST request (with user captured data) to azure function and I would like Azure function to use this as parameters and run. I can see there are many ways to trigger an Azure function in the docoumentation …

Total answers: 3

How do I use "format=json&data=" in post requests when developing in python?

How do I use "format=json&data=" in post requests when developing in python? Question: format=json&data={ “pickup_location”: { “pin”: “110096”, “add”: “address”, “phone”: “1111111111”, “state”: “Delhi”, “city”: “Delhi”, “country”: “India”, “name”: “name of pickup/warehouse location registered with delhivery” } } The data above is the payload of the post required on the API document. I don’t know …

Total answers: 5

POST with None data in Request Factory in Django

POST with None data in Request Factory in Django Question: I’m moving my django application from 1.x to 2.2, When running unit tests, I get a error about posting None as data. Is it allowed to post None in previous versions? Is there any way to post None via RequestFactory? I don’t want to give …

Total answers: 3

How to send POST request using flask.redirect?

How to send POST request using flask.redirect? Question: I’m trying to create a flask service in which I want to send the data coming from one request.form to another url in json format, Please can anyone help me to achieve this? redirect(url_for(‘any_method’), json = json.dumps(my_form_dict)) When I try to execute the above code I’m getting …

Total answers: 4

Can't send POST request to an old website

Can't send POST request to an old website Question: I tried different methods for so long to submit a POST request to a form using Python requests but no luck. I’m trying to send ‘3513’ to form’s text field which has the name TextTrnNo and then get the information from the website. One of my …

Total answers: 1