Skip to main content

Hi,

In Postman:

I have setup a POST request to https://xxx.com/login

In Body as form-data or x-www-form-urlencoded

username:user@test.com

password:Test123

And I get my response back OK

 

In my httpcaller I am setup like this :

attribute_creator_loginhttpcaller_configBut now I got a server error, just like my request is malformatted, as you see I even tried to put the form data into a specific attribute instead of passing directly inside the httpcaller. I got a feeling that fme httpcaller is having a problem with the "@" in the username, because in cURL I would put username in double quote to make it work just like :

 

curl -X POST -F "username=user@test.com" -F "password=Test123" "https://xxx.com/login"

 

What am I doing wrong there?

 

If it is form data you need to send. The easiest way is to change the "upload data" to "Multipart/Form Data" in the httpcallerimageSee how you get on.

 

Cheers,

Todd

 


Didn’t work either, but mocking the Api under Postman it worked, can’t figure out what is going wrong…!


Hi,

 

Based on your curl input. In FME it will look like this.

 

image


Well I didn't put in the full request url. Missed the login bit.


Exactly what I did but except for my mock API under Postman it is not working for the production environment :(


@newsafeuser​ you could try using the Use Authentication parameter at the bottom of the HTTPCaller as opposed to using an Upload Body. This will allow you to define a username and password. Let us know if this ends up working for you.

image


Reply