IBM QRadar SOAR

IBM QRadar SOAR

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Call REST API - UnicodeEncodeError

    Posted Thu November 14, 2024 09:30 AM

    Hi, 
    I need your help on the topic of using the REST API function of the PUT method. I need to add a comment/change description in the description to the request. In the situation when I try to pass Polish characters for example: Ł
    I get the message:
    UnicodeEncodeError: 'latin-1' codec can't encode character 'ƒu0142' in position 40: Body ('ł') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.

    I tried the way with encoding and decoding :

    I also added in headers:
    Accept-Language: pl-PL

    Please help me with the topic, seemingly a simple topic, but not really with this function.

    Thanks 
    Łukasz 



    ------------------------------
    Łukasz Tyński
    ------------------------------


  • 2.  RE: Call REST API - UnicodeEncodeError

    Posted Wed December 04, 2024 02:47 AM

    Problem solved, just had to use json.dump() function



    ------------------------------
    Łukasz Tyński
    ------------------------------