Issue with REST API using application/x-www-form-urlencoded in Mobile app

Issue with REST API using application/x-www-form-urlencoded in Mobile app

  

Hi,

I am using a application/x-www-form-urlencoded based POST REST API for Login & which is working perfect via a web-form as well as PostMan.

But When I try to consume the same with Outsystems Mobile App it not working.

Here is my Request Header:

POST /appserver/login HTTP/1.1

Content-Type: application/x-www-form-urlencoded

Host: xxxx.xxxxx.com

User-Agent: OutSystemsPlatform

username:admin@admin.com

password:assif@143

remember-me:true



Note: For confidentially I changed the domain & credentials in Post to dummy.


- Assif



Hi Assif,

Am I to understand you want to consume a REST API that expects the parameters to be Form URL Encoded? In that case, set the REST Method's "Request Format" Property to "Form URL Encoded".

Kilian Hekhuis wrote:

Hi Assif,

Am I to understand you want to consume a REST API that expects the parameters to be Form URL Encoded? In that case, set the REST Method's "Request Format" Property to "Form URL Encoded".

Yes I did that but it didn't work.

I guess there is @ char in my UserId and that could be the issue.

Coz I a getting Login Failure Message from API due to Invalid credentials while the same working on Postman.




Assif,

Did you check the Integration Log after setting the logging level to Full? This will allow you to see exactly what is sent to the external service.

Kilian Hekhuis wrote:

Assif,

Did you check the Integration Log after setting the logging level to Full? This will allow you to see exactly what is sent to the external service.

That's great Idea, right now was debugging through chrome, Let me check n get back :)

Thanks