URLConnection and form content

I am trying to access the DeepL Translation API but I seem to have a problem with the content of my HTTP request… I have staring at it for hours and am lost… Does anyone see a problem or is there a bug in URLConnection?

Notice that I create the var “payroll” which includes the “text” parameter… and then SetRquestContent to “payroll” with the proper mime type… but the service responds with an error “parameter ‘text’ not specified”. It seems like the Request Content is not actually being set…

Thanks for any help.

setrequestcontent has payload of “appication/x…”
should it be “application”?

1 Like

A super quick glance at the documentation, and it looks like this post is very relevant to you:

Graham… Thank you!.. I do not know how many times I looked at that and did not spot it… That was the problem.