So I made a POST method but everytime I try to send a request I get this error.

This is my method

def CreateCustomService(request):

return Response("DATA STORED")

And this is the request that I am trying to send

Content-Type: application/json

        "Title": "TbGold",
        "Description": "Done to detect TB",
        "PreConditions": ["Drink water"],
        "Duration":"30 mins",
        "HomeSampling": "True",
        "HomeSamplingPrice":  200,
        "Communication":  "True",
        "CommunicationPrice": 100,
        "ServicePrice": 18000,

This is my Model

class CustomService(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
Title = models.CharField(max_length=100)
Description = models.TextField()
PreConditions = ArrayField(models.CharField(
    max_length=100), blank=True, null=True)

Duration = models.DurationField()
HomeSampling = models.BooleanField(default=False)
HomeSamplingPrice = models.IntegerField(default=0)
Communication = models.BooleanField(default=False)
CommunicationPrice = models.IntegerField(default=0)
ServicePrice = models.IntegerField(default=0)

def __str__(self):
    return self.Title

Error when I open url

Error when I send request through test.http file

🔴 No definitive solution yet
📌 Solution 1

This error is most likely occuring from the post request being redirected as in this post django-rest-framework - POST Request returns "Method \"GET\" not allowed."