WebAPI http Request: Improvement of code input

Dear UiPath Team,

when inputting the “Text” in the “http Request” activity it is really troublesome due to formatting issues. Most of these result from the fact that quotation marks cannot be used.

I recommend to improve this field. It would be great to be able to invoke code. So that one must not transform the code before entering it into UiPath.

Or perhaps there are other suggestions?

I know I could save the code in a file and import it as a variable. Not the best option either.

Hi @PeCour

Could you please confirm something for me here.
This is purely for inserting hard coded values, correct?

So, in case of the body and a JSON value, it would require you to input:

"{""key"":""value""}"

instead of:

"{"key":"value"}"

Do you have any other examples where this is frustrating to you, other than JSON?

Hi @loginerror,

I did not quite understand your example, but I can give one. Perhaps we talk about the same:

How the code (HTTP Request, GraphQL) works in another system:

{
  product(context: "...", workspace: "...", id: "...") {
    children {
      pageElements {
        id
        name
        objectType {
          id
        }
        values {
          attribute {
            id
          }
          simpleValue
        }
      }
    }
  }

How I have to input it in UiPath:

"{product(context: \"+Chr(34)+"...\"+Chr(34)+", workspace: \"+Chr(34)+"...\"+Chr(34)+", id: \"+Chr(34)+Variable+"\"+Chr(34)+") {
    children {
      pageElements {
        id
        name
        objectType {
          id
        }
      }
    }
  }
}"+Chr(34)+"
  }"

That is due to Chr(34) instead of quotation marks.

Further if one adds further spaces or changes the code directly in UiPath it does not work due to formatting issues.

e.g., I have added “name” in a new line in the existing UiPath text: It did not work.
When I copy the text from id to id into it, it works, despite being exactly the same.

Thank you!