Skip to main content
Solved

HttpCaller gets bad request 400

  • September 4, 2018
  • 5 replies
  • 52 views

ladeef
Contributor
Forum|alt.badge.img+1

Howdy, I'm trying to connect to an API using this documentation:

 

https://github.com/ubahnverleih/WoBike/blob/master/Bird.md

It seems to work fine through Postman and other API callers, but not FME. I keep getting a bad request on the POST portion.

Best answer by nielsgerrits

Works for me.

Please note that when filling Content-type in the header and in the field it gives me a 400. I suspect that is the problem.

Workspace (2018.1): httpcaller20181.fmw

Please include workspace and/or printscreens of parameters next time. More efficient to reproduce / solve.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

Forum|alt.badge.img+2

Hi @lladefian

 

 

Does the response in FME give you any more information? Normally APIs give a reason why the response is bad.

 

It looks like the url you're connecting to is HTTPS, so you may want to try setting 'Verify SSL Certificates' to No, under HTTP Client Options and see fi that works.

ladeef
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • September 4, 2018

Hi @lladefian

 

 

Does the response in FME give you any more information? Normally APIs give a reason why the response is bad.

 

It looks like the url you're connecting to is HTTPS, so you may want to try setting 'Verify SSL Certificates' to No, under HTTP Client Options and see fi that works.
was thinking the same thing, but the error is just 1.1 400. I'll check the ssl settings.

 

 


ladeef
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • September 4, 2018

I tried the ssl setting and no luck. Do you know the correct format for json in the response body setting?  I feel like I may have that wrong.

The POST Request-Body is the following JSON: 

{"email": "<EMAIL-ADDRESS>"}


nielsgerrits
VIP
Forum|alt.badge.img+61
  • Best Answer
  • September 5, 2018

Works for me.

Please note that when filling Content-type in the header and in the field it gives me a 400. I suspect that is the problem.

Workspace (2018.1): httpcaller20181.fmw

Please include workspace and/or printscreens of parameters next time. More efficient to reproduce / solve.


ladeef
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • September 5, 2018

Works for me.

Please note that when filling Content-type in the header and in the field it gives me a 400. I suspect that is the problem.

Workspace (2018.1): httpcaller20181.fmw

Please include workspace and/or printscreens of parameters next time. More efficient to reproduce / solve.

Got it, the added content type in the body was the issue. Thanks!