Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

get Alerts or Count alerts returning funny characters, not JSON

Hi experts,

 

I'm trying to access the alertlist from Microfocus Service Manager. I'm using javascript to do that. Certificates and all the proxy stuff checks out by now but I'm still strugling with the response:

I'm starting with a basic count alerts request:

var url = "https://api.eu.opsgenie.com/v2/alerts/count";

I obviously add the Authentication header and the Content type part...

headers.push( new Header( "Content-Type", "application/json; charset=UTF-8" ) );

printing the response results in something like this:

receiveData:≻慤慴㨢≻潣湵≴㘺㈷㜳ⱽ琢潯≫〺〮㤰∬敲畱獥䥴≤∺づ愶㈴㥢戭晣ⴸ㠴㔴愭昰ⴷ戶攵〷㡡㍢㑥索

Last time I saw something like this the response was compressed (gzip). I don't see anything refering to deflate of gzip in the documentation, everythings like a fairy tail there.

Any help apprichiated!

BR,

Dávid

2 answers

1 accepted

1 vote
Answer accepted

Ok, solved:

For the other fellow SM developers : the doHTTPRequest has an argument (Binary response data) : I don't even know why I've set it to true but that seemed to be the problem. Just set it to false and the response is in clear JSON string format.

Can I ask what program you are using in this screenshot?

That is correct.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Opsgenie

Leveraging Atlassian’s Opsgenie and AWS Cloudformation Registry to stay ahead of incidents

In the past, managing IT infrastructure was a hard job. It required a lot of manual effort and it was hard to keep track of all the necessary information (monitoring, scalability etc). Thankfully, as...

961 views 0 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you