0
Under vurdering
http web request post error
Hi Warewolf-Team,
yeah sure, I have an problem with the HTTP Web Request Post. I only got an 400 Error. I want to send a body with json content. This should be possible, I think?
For some cases I need patch request to. Is this planed for the next time?
Kundesupport af UserEcho
Hi,
Thanks for the question. Can you please provide us with the following information (if possible):
Also a screen shot of the tool open in large view (double click the title bar of the tool or right-click in the title bar and click 'Show Large View').
Thanks
Hi Michael,
Under 'Headers' section, I can't see if you have the Content-Type header. If you don't have it can you please add it, and then try it out.
Thanks
Hi,
sorry, the view is to small. But the Content-Type ist set to application/json.
Thanks.
Hi Michael,
Can you confirm if the GET call to that API works? Unfortunately without being able to actually execute against the API from our side it's difficult to determine where the issue is coming from. Alternatively we could setup a TeamView session to try resolve this?
Thanks
Yes, there are no problems with the GET call. Now I think I found the issue. In the description value are some letters like ä, ü, ö and so on.
Do you know, how I can fix this?
Thanks!
You could try escaping them. Alternatively if you leave those special characters out of the payload, does the request work?
I tried to escape them with unicode. So for example the ä = \u00c4. When I debug the workflow in the browser, it looks perfect. The problem now is, that warewolf saves not the unicode in the variable. The output file only contains characters like "ä" instead of \u00c4.
For replacing it, I used the JS module.
JS code: json = json.replace(/ä/g, '\u00e4');
I have tested the code with some other strings.
Do you have any other idea, how to solve the problem?
Thanks
Which encoding do Warewolf use?