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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

All POST API return 201 garbage response Edited

I am creating a webhook from my application, the webhook created successfully at JIRA end but i am getting below mentioned response from JIRA:

<201,� t�_O�0ſ�r�4a-C�@� ��t۝+�ui� !~w;F�֞��;�=�A�� ^�̷��8Wj��trnmi�����. {D�I�P�� ��X*�m>K�9�l)�&\ʘ'
7��R�t ,��`2!-jl˜
}�
&�����`b�*��VK��D�]�a<��N�����:s������ɾ�4s�=tQ�iu3���9:��y!7����gʫ�oCK�T~�4�x�7�ԿV�Iّ��.Y�X�%��r�hPf��j(~�+!S"��'b��$j�f��O@��
������Z����q�k�M�)%�>����UX፴���X��A��ax}} �� �g��n ,{Content-Type=[application/json;charset=UTF-8], X-AREQUESTID=[858x2487228x1], X-ANODEID=[TestNode1], X-XSS-Protection=[1; mode=block], X-Frame-Options=[SAMEORIGIN], Content-Security-Policy=[frame-ancestors 'self'], X-ASEN=[SEN-10859722], X-Seraph-LoginReason=[OK], X-ASESSIONID=[4p12rb], X-AUSERNAME=[bharo1], Location=[https://mycoders.atlassian.net/rest/webhooks/1.0/webhook/65], Content-Encoding=[gzip], Cache-Control=[no-cache, no-store, no-transform], Expires=[Sun, 14 Jun 2020 14:18:49 GMT], Date=[Sun, 14 Jun 2020 14:18:49 GMT], Connection=[close], Set-Cookie=[AWSALB=CvXoXMMN7yL0Q0iWNKk1rDUaYrdHPU/icGpjXueLs9Zruyo2WGeuQUOIWgoiutxGH9sipMNWF9iZnfLI7EtXAPc/9TmiXZ3wRAE3MyCm0eDSFQIXs6FZbHF+yErw; Expires=Sun, 21 Jun 2020 14:18:49 GMT; Path=/, AWSALBCORS=CvXoXMMN7yL0Q0iWNKk1rDUaYrdHPU/icGpjXueLs9Zruyo2WGeuQUOIWgoiutxGH9sipMNWF9iZnfLI7EtXAPc/9TmiXZ3wRAE3MyCm0eDSFQIXs6FZbHF+yErw; Expires=Sun, 21 Jun 2020 14:18:49 GMT; Path=/; SameSite=None; Secure, JSESSIONID=17EEA359ABA86ED1C1B36E16F39276A0; Path=/; HttpOnly, atlassian.xsrf.token=B4Z2-S08N-ST7Y-R5BR_b2e88aa76a6f81509a14f9a267c07d60bfe2f444_lin; Path=/], Server-Timing=[cdn-cache; desc=MISS, edge; dur=29, origin; dur=161], Strict-Transport-Security=[max-age=86400], X-Content-Type-Options=[nosniff], Server=[JIRA Server]}>

 

Please help me.

1 answer

0 votes
Dario B Atlassian Team Jun 18, 2020

Hello @Manoj Chaudhary ,

Welcome to the Atlassian Community!

Status Code 201 means "Created". This means the request was successful and the webhook has been created and this is consistent with what you have already observed.

As for the garbled text, this can depend on many different factors (different language or character encoding, etc.).

Therefore, in order to proceed, can you kindly provide more details on how are you sending the REST API requests to create Webhooks?

 

Cheers,
Dario

 

  

Hi @Dario B , the same issue I am facing. We are using Jira server, for that if I am trying to create issue it is returning a response code 201 and giving garbled code. I am not facing this issue when I am using Jira Cloud. Here is my code.

 

Client client = Client.create();
OAuthClientFilter filter = new OAuthClientFilter(client.getProviders(), oAuthParameters, oAuthSecrets);
client.addFilter(filter);
URI issueuri = new URI("<MY DOMAIN URL HERE>/rest/api/2/issue");
WebResource webResource = client.resource(issueuri);
String issueInput=getIssueInput(); //Here I am creating a json to a string

ClientResponse response = webResource.type("application/json").post(ClientResponse.class, issueInput.getBytes());
System.out.println("\nResponse Status Code = "+response.getStatus());
System.out.println("response.toString() : "+response.toString());

output = response.getEntity(String.class);

So, It is giving a response like

���� ��� ����]�<�������

Can I get any suggestion on this, exactly why it is creating this problem 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of Ji...

50 views 2 3
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