HTTP Response Log

Post Reply
hyang
Newbie
Posts: 5
Joined: Fri Apr 23, 2021 7:14 pm

HTTP Response Log

Post by hyang » Wed Sep 08, 2021 4:44 pm

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?

saitok
Member
Posts: 51
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: HTTP Response Log

Post by saitok » Mon Sep 13, 2021 6:49 am

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,

hyang
Newbie
Posts: 5
Joined: Fri Apr 23, 2021 7:14 pm

Re: HTTP Response Log

Post by hyang » Mon Sep 13, 2021 5:13 pm

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

jan_suhr
Advanced member
Posts: 451
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: HTTP Response Log

Post by jan_suhr » Mon Sep 13, 2021 5:49 pm

Have you checked if the response is shown in the debug of Messages log.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

saitok
Member
Posts: 51
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: HTTP Response Log

Post by saitok » Wed Sep 15, 2021 12:10 pm

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,

hyang
Newbie
Posts: 5
Joined: Fri Apr 23, 2021 7:14 pm

Re: HTTP Response Log

Post by hyang » Thu Sep 16, 2021 4:00 pm

Saitok,

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

Thank you!

Post Reply