Skip to main content
Solved

How to enable geo+json content-type within HTTPCaller?

  • October 19, 2018
  • 7 replies
  • 227 views

juanmahere
Supporter
Forum|alt.badge.img+13

Hi all,

I was trying hard to find a solution for this little issue within the HTTPCaller.

I'm trying to request geoJSON data from an API, so, using the HTTPCaller works fine until the Content-type for a desired Request (POST, PUT) needs “Content-Type: application/geo+json”

 

As I've tried, with no luck, with this parameters:

 

Throwing me back a 404 error...

I wanted to know if there is any workaround to enable that content-type kind? I know that if I were using cUrl, I'd only need to add this Header:

-H "Content-Type: application/geo+json"

Btw, I'm using FME Desktop 2018.1

Thanks in advance,

 

Best answer by david_r

The dropdown list shows the most common values, however you can simply type whatever you need into the field. For example:

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.

7 replies

david_r
Celebrity
  • Best Answer
  • October 19, 2018

The dropdown list shows the most common values, however you can simply type whatever you need into the field. For example:


nielsgerrits
VIP
Forum|alt.badge.img+61

Leave the Content Type field empty (because this will override the value added manually in the header.) and manually fill a header. (Content-Type = application/geo+json)


nielsgerrits
VIP
Forum|alt.badge.img+61

The dropdown list shows the most common values, however you can simply type whatever you need into the field. For example:

Always so bloody fast with your answers @david_r ... You should receive a special badge for it lol.

david_r
Celebrity
  • October 19, 2018
Always so bloody fast with your answers @david_r ... You should receive a special badge for it lol.

 

Sometimes too fast ;-)

 

 


juanmahere
Supporter
Forum|alt.badge.img+13
  • Author
  • Supporter
  • October 19, 2018

The dropdown list shows the most common values, however you can simply type whatever you need into the field. For example:

Thanks david_r and nielsgerrit, but I've left empty the Body Content-type and added another Headers row with:

 

 

but, throwing same error 404.

 

 

Again, I've tried to put on Body Content-type manually: application/geo+json, declaring again in Header as seen on screenshot, but no success.

 

I'm a bit lost, surely is a tiny mistake, but cannot find it. Thanks.

 

 

 


david_r
Celebrity
  • October 19, 2018

Since you get a 404 it could be that your URL is wrong, and that it's not an issue with the content-type.

You could move the generation of the URL to e.g. an AttributeCreator and send it to a Logger or Inspector to check that it's really a URL that exists.

A typical issue could be that either spaceID or featureID have some unexpected value.


juanmahere
Supporter
Forum|alt.badge.img+13
  • Author
  • Supporter
  • October 19, 2018

Since you get a 404 it could be that your URL is wrong, and that it's not an issue with the content-type.

You could move the generation of the URL to e.g. an AttributeCreator and send it to a Logger or Inspector to check that it's really a URL that exists.

A typical issue could be that either spaceID or featureID have some unexpected value.

I've moved from POST to PUT and using PUT with your comments worked. Thanks again!