Arseni
Katalon Apprentice
01/05/2018

Web Service Response

How i can get the description of CodeResponse. For example explanation for code 400. Thanks. 
Upvote
Quote

Comments

  • Trong Bui
    Katalon Moderator
    01/08/2018
    Did you mean the response text from the Response Object? For example:
    response.getResponseText()

    Upvote
    Quote
  • Arseni
    Katalon Apprentice
    01/09/2018
    in this case, he returns 400 but not 404 or 403
    Upvote
    Quote
  • santi hutapea
    Katalon Apprentice
    01/16/2018
    hi @Trong Bui  , have you solved this case? if yes can you share to us. thanks

    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    01/19/2018
    I still not get the question yet. Does it mean we expect 404, 403 instead of 400 or so? Could you please explain more on the context?
    Upvote
    Quote
  • Arseni
    Katalon Apprentice
    01/24/2018
    For example: http://prntscr.com/i4xi47  What is the explanation for this error ?   why is 400?
    I can somehow get the concrete answer to the error?
    Upvote
    Quote
  • rafael quinones
    Katalon Apprentice
    01/24/2018
    Hello, how can i get the response status code of a URL, not a object?

    I'm using this keyword:

    links = WebUI.getAllLinksOnCurrentPage(true, [])
    for (url in links) {
    println(url)
    }

    I want to get the status code of each URL string (ex: 200, 404) 

    Thanks
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    01/25/2018
    Arseni said:
    For example: http://prntscr.com/i4xi47  What is the explanation for this error ?   why is 400?
    I can somehow get the concrete answer to the error?
    Arseni,

    In general, 400 is the code for bad request (The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing). 

    Currently, Katalon Studio throw runtime exception instead of the object containing error code. We are working in this issue to support user verifying the error code. The feature will be release in the our next releases.
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    01/25/2018
    Hello, how can i get the response status code of a URL, not a object?

    I'm using this keyword:

    links = WebUI.getAllLinksOnCurrentPage(true, [])
    for (url in links) {
    println(url)
    }

    I want to get the status code of each URL string (ex: 200, 404) 

    Thanks
    I think that in the 'for' loop, we could use API built-in keywords to send request to each 'url', get the response object and print out the code. It is easy to get the code from response object.
    Upvote
    Quote
  • rafael quinones
    Katalon Apprentice
    01/25/2018
    Trong Bui said:
    Hello, how can i get the response status code of a URL, not a object?

    I'm using this keyword:

    links = WebUI.getAllLinksOnCurrentPage(true, [])
    for (url in links) {
    println(url)
    }

    I want to get the status code of each URL string (ex: 200, 404) 

    Thanks
    I think that in the 'for' loop, we could use API built-in keywords to send request to each 'url', get the response object and print out the code. It is easy to get the code from response object.
    Whats the built-in keyword for this ?
    Can you give me an example please.
    Thanks
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    01/26/2018
    Rafael,

    You can find these keywords at Keywords Browser in Katalon Studio. They are under Web UI Keywords/Element.


    Upvote
    Quote
  • rafael quinones
    Katalon Apprentice
    01/27/2018

    Thank you

    Upvote
    Quote
  • Naresh Kumar
    Katalon Apprentice
    02/13/2018
    Lol... I too got the same error when I am reading Devops Course Online. I came to Know that it was Server Issue.
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    03/02/2018
    We have released the version 5.3.1 which contains the fix. Could you give it a try?
    Upvote
    Quote
Sign In or Register to comment.