-1

I want to send some json to hipchat upon error. well raw json is not very readable in the hipchat.

the hipchat client support /code and I want to have similar output using the API. i tried many ways (I already implemented one library in php that using the same class and html element that /code is generating and send it to the API) but it comes with it's own problems.

first the API has 100,000 character limit. there was some cases that my pretty print exceeded the limit(bcs of adding many html and css to the message).

also it's not easy to port it to other project. I created that library in PHP, now i want to integrate a .netCore application and I need to write the whole things again.

[Update 1]

it turned out that hipchat API support this by setting the header as Content-Type:text/plain and send the content with /code in front of the message

/code {yourcontent}

this way message will with color yellow. is there any way to set the color?

Mohammad Hossein Amri
  • 1,842
  • 2
  • 23
  • 43

1 Answers1

0

I could achieve this by sending json and setting "message_format":"text" previously it was set to html, that's why /code didn't work before

Mohammad Hossein Amri
  • 1,842
  • 2
  • 23
  • 43