How can I do an http-request with a post method to an API in Angular 9

Discussão em 'Angular' iniciado por Rinzler21, Fevereiro 13, 2025.

  1. Rinzler21

    Rinzler21 Guest

    This is the first time I'm trying to do that and I don't know exactly how to start, if someone can guide me that would be very help full. I'm trying to do a login and if I want it to work a I have to do an http request with a post method to the API and will return me the information I need, but when I tried said Error 404 with URL, I tried with Postman and said other error that I will let below . I'm not telling that someone have to do it for me, just need someone to tell how can I start.

    • This is the API https://devapi.shocklogic.com/v1.0/:key/Users/login/
    • To make the petition to this endpoint i have to send this token in the header Token Token-App': '7875d82ca05f8ba818011eb04a890c20cb44c52e'
    • Also I need to send three params Key, Identifier of the person and Password

    Error that Postman said:

    {
    "type": "error",
    "message": "please make sure your meet the following field requirements",
    "check": 0,
    "passed": false,
    "requirements": [
    [
    "Identifier",
    {
    "is_required": true,
    "requires_value": true,
    "min_length": 1,
    "max_length": 150
    }
    ],
    [
    "Password",
    {
    "is_required": true,
    "requires_value": true,
    "min_length": 1,
    "max_length": 60
    }
    ]
    ]
    }

    Continue reading...

Compartilhe esta Página