Forum Discussion

smynam's avatar
smynam
New Contributor
4 years ago
Solved

API Works on Postman- Imported Request to Ready API Doesnt work

Hi 
My API woks in Postman it is a simple get request, under authorization tab passing in credentials [username & password] and default headers - 

In Readyapi imported the collection through the integration tab , no luck with ready api, using the authorization tab from the root level [parent level] added the authorization using the basic auth - still no luck

 

could you please fill in what i am missing

 

  • This is how we solved the issue. the request which we are passing through is going through Akamai gateway. 

    The Akamai has allowed the request coming from Postman as valid request, while the same request content when requested from Ready API - here Akamai flagged it as an Anomaly library [chat bot] and blocked the request which is making it to fail. 

     

    Resolution : The team has proposed adding an user-agent header in the preferences setting under http and that did the trick

     

    Please mark it as an solution once validated - happy to learn and contribute back!!

6 Replies

  • richie's avatar
    richie
    Community Hero

    Hey smynam 

     

    we're gonna need more info to help.

     

    when you say "no luck" - what actually happens?  are you getting a response but with a 400 series response code?  (e.g. 400 bad request? 401 unauthorized?), no response?

     

    what does it say in the ReadyAPI! log and the Errors log?

     

    cheers,

     

    rich

    • smynam's avatar
      smynam
      New Contributor

      HTTP/1.1 405 Method Not Allowed
      Date: Wed, 09 Sep 2020 13:48:20 GMT
      Content-Length: 0
      Connection: keep-alive
      x-amz-cognito-request-id: 6caf1366-167e-40b4-b1a5-0fdd653ca52e
      X-Application-Context: application:prod:8443
      X-Content-Type-Options: nosniff
      X-XSS-Protection: 1; mode=block
      Cache-Control: no-cache, no-store, max-age=0, must-revalidate
      Pragma: no-cache
      Expires: 0
      Strict-Transport-Security: max-age=31536000 ; includeSubDomains
      X-Frame-Options: DENY
      Server: Server
      Allow: GET

       

      content type : null

      • richie's avatar
        richie
        Community Hero

        Hey smynam 

         

        you got a 405 - that's method not allowed meaning you tried using a method that isn't supported by the API you're poking.

         

        This is REST - not SOAP - right? - you tend to have less control wiht the methods with SOAP than REST.

         

        SO! - you have a 405 at the top of the RAW response and at the bottom you have an 'Allow' header and this indicates the methods that are supported by the endpoint you are hitting.

         

        Are you sure you did the request using a GET method?  According to the response header details you're getting, I'd suggest you used a different method - not a GET....maybe a POST?

         

        have a look at the following pic - you can see the Method value is defined as GET here.

         

        If you are definitely submitting a GET request against your endpoint, I'd suggest there's a defect with endpoint itself, but I wouldn't expect this.

         

        ta

         

        rich