Solved

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

  • 19 October 2018
  • 7 replies
  • 21 views

Badge +11

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,

 

icon

Best answer by david_r 19 October 2018, 13:39

View original

7 replies

Userlevel 4

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

Userlevel 6
Badge +33

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)

Userlevel 6
Badge +33

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.
Userlevel 4
Always so bloody fast with your answers @david_r ... You should receive a special badge for it lol.

 

Sometimes too fast ;-)

 

 

Badge +11

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.

 

 

 

Userlevel 4

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.

Badge +11

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!

 

 

Reply