I try to send a PUT request to a specific company website’s api. Basically it’s a ticket system (Remedy / BMC). In this request I want to add a worklog entry (which works perfectly). But if I want to attach a file to this worklog entry I have to be very specific about my request.
I made it work in postman, but now I’m having serious trouble translating this to the UIPath’s HttpClient.
So first things first, here is the working example in my postman:
If you have file in UiPath project folder you don’t need use full path to file otherwise you have to
It’s only hint because it’s hard find straight solution without access to similar environment.
The setup which I gave you works fine for sending images for captcha.
Ok, thank you very much. The thing with this environment is it’s very strict. I have to send the request exactly as shown in my postman screenshot. Otherwise, it won’t work since it’s a very old, strict, and outdated API (which I can’t change in any shape or form).
Sorry, I don’t understand that part:
Can you elaborate in more detail to me?
Ok I know what you mean. I will try that and get back to you (tomorrow). Thx
Also: Where should I include my JSON Data? I have to add the json data + the data file in my request as shown in my postman. How to combine these two so it’s exactly like in postman? should I also include it into the attachment (since it’s another kind of form entry), or should I include it in the request body?
I mean the test.txt file if it is in the same folder where you have UiPath project you don’t need to value input full path of the file.
I’m afraid if you want send json data you have to add JSON content to body as string. And here you have to aware because it is string and everything where you have double quotes you have to add additional two. Like in this example:
you should transform to: