postman

Python : JSON Error: Syntax error, malformed JSON

Python : JSON Error: Syntax error, malformed JSON Question: My Python code, which I obtained from POSTMAN, throws an error with the string "code":"E101","message":"JSON Error: Syntax error, malformed JSON"}" although in POSTMAN, the request was successful and produced the expected JSON result. below is my python code import requests url = "APIURL" payload={‘data’: ‘{ "authenticate":{ …

Total answers: 2

Flask – sqlalchemy.exc.StatementError: (builtins.TypeError) Not a boolean value: 'False'

Flask – sqlalchemy.exc.StatementError: (builtins.TypeError) Not a boolean value: 'False' Question: I want to get the Default value of OnlineAvailability as True. By default, all Doctors will have all Slot Timings Available. If I give the JSON Body data in Postman and POST the data: http://127.0.0.1:8000/online { "OnlineTimeSlot": "18:30" } Here, OnlineAvailability is being set to …

Total answers: 2

How i can realize multiple pagination(drf)

How i can realize multiple pagination(drf) Question: If I’ll send get request like thisenter image description here, i need to have multiple pagination (LimitOffset and PageNumber). models.py: from django.db import models class Products(models.Model): title = models.CharField(max_length=255) description = models.TextField(blank=True) photo = models.ImageField(upload_to="photos/%Y/%m/%d/", null=True) hashtag = models.CharField(max_length=255) is_hit = models.BooleanField(default=False) category = models.ForeignKey(‘Category’, on_delete=models.PROTECT, null=True) def …

Total answers: 1

Parse Error: The server returned a malformed response – Error: Parse Error: Expected HTTP/ – when trying to access one of my app URLs with postman

Parse Error: The server returned a malformed response – Error: Parse Error: Expected HTTP/ – when trying to access one of my app URLs with postman Question: I am managing an app built by third parts in python. I have this url dispatcher urls += [(r’/path/objectAlpha/(.*)’, objectAlphaHandler)] # this was made by third parts, it …

Total answers: 1

PUT request via postman works, but via python requests not

PUT request via postman works, but via python requests not Question: When I send PUT request via postman everything is ok, but when I copy code from postman to python I get this: {"code": 50035, "errors": {"_errors": [{"code": "CONTENT_TYPE_INVALID", "message": "Expected "Content-Type" header to be one of {‘application/json’}."}]}, "message": "Invalid Form Body"} the code: url …

Total answers: 1

Unable to access docker container Socket hang up error

Unable to access docker container Socket hang up error Question: I have successfully built and started the docker container, it is running perfectly, but when I try to access it [End point url 0.0.0.0:6001] I am getting a "socket hang up" error GET http://0.0.0.0:6001/ Error: socket hang up Request Headers User-Agent: PostmanRuntime/7.26.8 Accept: */* Postman-Token: …

Total answers: 4

How can I upload files in Postman?

How can I upload files in Postman? Question: I want to pass images through POST method in POSTMAN but I get None type response in the line request.files[‘image’] I have tried a number of different things but I am not able to solve the problem. from flask import Flask,jsonify from flask import request import face_recognition …

Total answers: 5

How to send an image to a flask server using Postman

How to send an image to a flask server using Postman Question: I need to send an image file to a flask server using Postman.I did send it using a web browser and “render template”.But when i tried the same program with postman it showed “method not allowed” . I also tried /upload, but it …

Total answers: 3