Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Is there away to verify in a request header that weather http or https was sent

goofy78270
goofy78270 Posts: 133

I am looking to create some logs based on the actual traffic, and was wondering if there was a way to determine if a request was sent using http or https, within a script. I know I can pull the initial url, but I was looking for more of a header option, internal value like input.get("Request HTTP Headers"), or such.

Best Answer

Answers

  • jakubiak
    jakubiak Posts: 795 admin

    You cannot check anything in the HTTP header, since the HTTP header is identical between HTTP and HTTPS. When using SSL, the transport changes but the HTTP headers and payloads do not.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    See my comment in this other thread:
    get Data From Traffic Viewer Object

    I think you can get the endpoint URL (which includes the protocol) using input.get(SOAPUtil.END_POINT).

  • goofy78270
    goofy78270 Posts: 133

    @jakubiak - is it possible to capture just the transport method, rather than having to parse to url? That is more what I am looking for.