Web Service Response

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

Comments

  • Did you mean the response text from the Response Object? For example:
    response.getResponseText()

  • in this case, he returns 400 but not 404 or 403
  • hi @Trong Bui  , have you solved this case? if yes can you share to us. thanks

  • 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?
  • 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?
  • 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
  • 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.
  • 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.
  • 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
  • Rafael,

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


  • Lol... I too got the same error when I am reading Devops Course Online. I came to Know that it was Server Issue.
Sign In or Register to comment.