KNIME RESTful Nodes: response status 200 with empty body

krest
rest
#1

Dear fellow KNIMErs,

I have a similar issue to this one:

The solution of that one was to use the Palladian http-nodes, which I can confirm acts as a workaround to the issue in the Analytics Platform. However, that is not a solution for the KNIME Server we are running, where I’d like to use standard nodes as much as possible.

This is what I get in KNIME:
image
This is what I get in Postman:

Did anyone figure out a way to get this working with the standard RESTful nodes?
Thanks & BR
Alex

0 Likes

#2

Just a guess:

You’re getting a JSON content type in postman but a text/plain type in KNIME? Have you specified an Accept header? If so you could try removing this or setting it to application;json; charset=UTF-8 or something similar.

Cheers

Sam

1 Like

#3

Hi Sam,
thanks for the quick response!
Sorry, I did forget to post the headers that I’m sending (which are the same between Postman & KNIME):

I also now added the “Accept” header with value “application/json; charset=UTF8” as suggested by you, and it shows “text/plain” in the response Content Type nonetheless.

BR Alex

0 Likes

#4

Just in case it matters did you use “application/json; charset=UTF8” or “application/json; charset=UTF-8” (UTF-8)?

It looks like KNIME thinks you’ve been sent an empty plain text string as a response. I’m afraid I don’t have any ideas to suggest.

Cheers

Sam

0 Likes

#5

Hi Sam,
thanks for the attention to detail. Indeed I was sending “UTF8” instead of “UTF-8”.
I corrected that and tried again, both by including that in an extra “Accept” header like this:


…or by including it in the Content-Type like this:

In both cases, KNIME still thinks that I’m getting an empty plain text string in the response:
image

BR Alex

0 Likes

#6

Hi Alex,

that’s an interesting issue. A small observation- it seems that your situation differs from the thread that you’ve linked at the beginning- they got an missing body (the red question mark), while you get the body not displayed (blank white space).

Could you try to dump the resulting table into a file to check if the cell has any contents? And maybe check what does the “Spec” tab show for the possible values in the body column. I wonder if maybe the problem is not with wrong type of returned payload, but rather with displaying the content, similar to what has been observed in Problem while concatenating via the GroupBy node Value 0 ?

Cheers,
Mischa

1 Like

#7

Thanks Mischa,
I tried the suggestion from Problem while concatenating via the GroupBy node Value 0 by copying + pasting the contents into a text editor (Notepad++ or normal Notepad) and can confirm that it’s completely empty (not even a space). So it seems to be something else in this case.

The “Spec” Tab shows the following:

As a workaround, I just installed Anaconda Python on my KNIME Server & my laptop running the KNIME Analytics Platform, and then used the “requests” package to do the work for me (like shown here: Delete Request with body). That way I can work with KNIME Server again (even though I’m not completely happy with this solution).

Best regards,
Alex

1 Like