POST data constructor problem



  • hello, I have a problem with sending arrays with the POST data constructor, the server reads it as a string instead of an array, and it's giving me Status 400 instead of 200
    for example
    [[ERRORS]] = ["problem 1"] or [[ERRORS]] = ["Problem 1", "Problem 2"]
    and when i send it with POST like let say
    "mistake", [[ERORRS]] , the server say's it wants an array and not a string



  • @Kiryakov said in POST data constructor problem:

    hello, I have a problem with sending arrays with the POST data constructor, the server reads it as a string instead of an array, and it's giving me Status 400 instead of 200
    for example
    [[ERRORS]] = ["problem 1"] or [[ERRORS]] = ["Problem 1", "Problem 2"]
    and when i send it with POST like let say
    "mistake", [[ERORRS]] , the server say's it wants an array and not a string

    Exactly a month has passed, I think it's time to give an answer :D

    The most obvious answer is don't use data constructor:

    67b90da2-c5f1-4934-a148-d849d5b90987-изображение.png

    67ae0019-2537-4bc0-95c5-28491ed69165-изображение.png


Log in to reply