Skip to main content
Solved

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

  • October 19, 2018
  • 7 replies
  • 171 views

juanmahere
Supporter
Forum|alt.badge.img+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,

 

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:

View original
Did this help you find an answer to your question?

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+54

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+54
david_r wrote:

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
nielsgerrits wrote:
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+11
  • Author
  • Supporter
  • October 19, 2018
david_r wrote:

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+11
  • Author
  • Supporter
  • October 19, 2018
david_r wrote:

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!

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings