Page 1 of 1

HTTP Response Log

Posted: Wed Sep 08, 2021 4:44 pm
by hyang
The log that is coming back from HttpRequest looks something like this:

URL: https://www.chartonline.com/EnfocusWS/V ... ghtSuccess
Request type: PUT
Finished status: Failed
Status code: 500
Status description: Internal Server Error
Last error: HTTP protocol error. 500 Internal Server Error.

Is there a way to get the body of the response in the log?

Re: HTTP Response Log

Posted: Mon Sep 13, 2021 6:49 am
by saitok
Hi,

If you can edit the response file with any command, you might be able to convert the file to XML.
If you can do that, Switch can pick up the body using Metadata module and also can add it to the log.
As my very simple test result, when I replace <html xmlns="http://www.w3.org/1999/xhtml"> to <html>, I can read the file as XML by Switch.

Regards,

Re: HTTP Response Log

Posted: Mon Sep 13, 2021 5:13 pm
by hyang
Unfortunately, the log file itself does not include the body that I am looking for. When I use Postman, I get the following additional information in the body of the response. In Switch, I only get the header back in the log file.

System.Exception: PreFlightSuccess error: The process cannot access the file '\\serverB\Docs04\Facility\2021\07_JUL\29\REQ_100008\PDF-5509093.pdf' because it is being used by another process..

HEADERS
=======
Accept: */*
Accept-Encoding: gzip, deflate, br
Authorization: Basic d2MtRW5mb2N1czo1QFhMRk5YTEtTQ1g=
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 350
Content-Type: application/xml
Host: www.chartonline.com
User-Agent: PostmanRuntime/7.28.4
Via: 1.1 192.168.3.143:80
Postman-Token: b196d692-8049-4092-9553-ce2d3c7b91d4
X-Forwarded-For: 192.168.3.116
X-Forwarded-For-Port: 53806

Re: HTTP Response Log

Posted: Mon Sep 13, 2021 5:49 pm
by jan_suhr
Have you checked if the response is shown in the debug of Messages log.

Re: HTTP Response Log

Posted: Wed Sep 15, 2021 12:10 pm
by saitok
Hi,

Do you have a connection to send data after HTTP request?
I think you should check "response"(not log) file generated through the connection.

Regards,

Re: HTTP Response Log

Posted: Thu Sep 16, 2021 4:00 pm
by hyang
Saitok,

You are correct. The body is in the response and not in the log. That's exactly what I need.

Thank you!