Forum Discussion

Lightem's avatar
Lightem
Occasional Contributor
6 years ago

Send HTTP request without appending the end point

This question was asked in a previous thread but their answer is not my issue and no other answer was posited.

I have a HTTP request I would like to add to a load test. It is like this

https://myhostname.net/internalservice-myhostnamestatus/v1/services/applicationstatus

When i run this in SoapUI i get an incomplete response. If I simply load this into a browser it works just fine.

It looks like SoapUI is actually sending

https://myhostname.net/internalservice-myhostnamestatus/v1/services/applicationstatus HTTP/1.1



Is there a way to submit the request without appending it with HTTP/1.1?

11 Replies

  • richie's avatar
    richie
    Community Hero

    Hi Lightem 

     

    The HTTP/1.1 isn't actually going across in the request string - it's not like it's an extra parameter - it's just declaring the version of HTTP it's using - which yes strictly is being sent - but not in the request string - it's like a header - although it's not actually a header as far as I'm aware.

     

    Just had a look at a complete list of standard headers- nope - it's not a header

     

    What makes you think you are passing this across when you submit the request?  is it just that you've see the string in the RAW tab indicates URI followed by HTTP/1.1?

     

    I think that's steering you down the wrong path.  Ignore that for now and look at the differences between what you're submitting via the browser and your ReadyAPI!/SoapUI config - that's going to be the problem.

     

    Also - can you clarify what you mean by 'incomplete response' please?

     

    If you can provide the stacktrace for the request (ReadyAPI! log, response details etc.) that can only help people diagnose your issue, but I'd disregard the version of HTTP - that's not being added to your URI string.

     

    Cheers,

     

    richie

     

     

    • Lightem's avatar
      Lightem
      Occasional Contributor

      Raw response to SoapUI request:

      HTTP/1.1 200
      Date: Thu, 28 Feb 2019 18:08:33 GMT
      Content-Type: application/json;charset=ISO-8859-1
      Transfer-Encoding: chunked
      Connection: keep-alive
      Set-Cookie: __cfduid=d673ca4bba1ce54f6f2b056cb2b225aed1551377313; expires=Fri, 28-Feb-20 18:08:33 GMT; path=/; domain=.mailinator.com; HttpOnly
      Set-Cookie: JSESSIONID=s3~60B72731C657FDA26FBAB97BAEAD9C94; Path=/; HttpOnly
      Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
      Server: cloudflare
      CF-RAY: 4b04d6535a0f1ea7-SJC

      {"messages":[],"to":"addressID"}

       

      URI from SoapUI: https://api.mailinator.com/api/inbox?to=addressID%40mailinator.com&token=?&private_domain=true%20HTTP/1.1

       

      Response when I copy the URI from SoapUI into browser:

      {"messages":[{"fromfull":"source@source.com","subject":"email subject","from":"source@source.com","origfrom":"source@source.com","to":"addressID","id":"emailID","time":1551375385000,"seconds_ago":573}],"to":"emailID"}

      It appears that the entirety of the "messages" is being ignored.

       

      ReadyAPI log:

      • Thu Feb 28 10:08:33 PST 2019: INFO: Got response for [TestStepName] in 247ms (63 bytes)
    • Lightem's avatar
      Lightem
      Occasional Contributor

      Also - can you clarify what you mean by 'incomplete response' please?

      By incomplete response, I am speaking to the issue of the missing message. 

       

      Thank you for your reply to date richie . I appreciate your help. 

      • richie's avatar
        richie
        Community Hero

        Hey Lightem 

         

        It took a bit of going through your message to work out the problem - for future reference if you try and lay out everything providing clear details - e.g. I am publishing a REST request (WHATEVER method - PUT, POST, GET) using this payload and this is the response etc.

         

        Anyway - right - when you say  'incomplete response' you mean the message array in the response payload appears empty.

         

        This is weird considering the response you get via your browser includes a populated message array in your .json response, but the response payload in ReadyAPI! is generated with an empty message array in the payload - so my first thought is you've got some eventhandler or something stripping the content in the response before it's presented - but you'd know about that if you'd gotten that setup - it's not like just hitting a checkbox by mistake!

         

        Ok - we need a bit of help to assist diagnosing this.  Have you used Telerik's Fiddler before?

         

        You need to download that - its a packet/network sniffer like WireShark (except a lot easier to use).

         

        Download that - what you need to do is monitor the request when you try the submission in SoapUI and then compare with when you submit the request via the browser/postman or whatever.

         

        Essentially you are proxying the requests to Fiddler before they get to their specified endpoint - Fiddler will indicate whats going on.

         

        So follow the instructions here to setup Fiddler as ReadyAPI!/SoapUI  proxy

         

        Once the Fiddler cert is setup and you're good to do - within Fiddler hit the 'Any Process' button to select the ReadyAPI! window as the target to proxy

         

        Submit your request in ReadyAPI! and watch the magic happen in the traffic window

         

        1. Within ReadyAPI!, disable the proxy (button on mainscreen below main toolbar)

        2. De-select ReadyAPI! as the target process (via the Any Process button)

        3. Have you browser ready and copy in the URI to be submitted.

        4. <Alt>+<TAB> to Fiddler and click the 'Any Process' button and select the browser window

        5. Within the browser - submit your request - traffic will be recorded

        6. De-select browser as the target process (via the Any Process button) 

         

        Please post the results so we can review - RAW, HEADERS and JSON results for both the ReadyAPI and Browser requests please!

         

        Cheers,

         

        richie