Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

584
Visualizações
API : Postman form-data works, but the raw equivalent doesn't

I have an API in which if I am sending POST request thru body type : form-data , i am able to see the output. Here is the successful request Form-data success

But if I use the same data in raw form, it give me this error

 "error": "invalid_request",
    "error_description": "AADB2C90083: The request is missing required parameter: grant_type.\r\nCorrelation ID: 742e7aa2-de23-4589-8b5c-c2fadbbe1537\r\nTimestamp: 2022-01-26 21:21:29Z\r\n"
}

Raw data failure

Here is what Header looks like when the request is successful header successful The reason i encountered is, if i unselect the Content-type under header at the success (first) scenario, it also gave me the same error.

I also saw this post Postman form-data works, but the raw equivalent doesn't

But this does not work for my solution

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I am using Cypress to send this POST request. I solved this by adding form "true" in the function. I still am not sure how to fix this in POSTMAN

headers: 
   {
     Connection: "keep-alive",
     "Content-Type": "form-data"
   },
form: true,
about 4 years ago · Juan Pablo Isaza Relatório

0

JSON and Form Data are completely different ways to encode data.

If your server-side program expects to receive data encoded as Form Data (and only as Form Data) then it isn't going to be able to handle you sending it JSON instead.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda