Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira get attachment content/thumbnail returning status code 303 (see others)

Shaik Salman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2024

I am trying to get a attchements by passing attachmentId but in response I am getting 303 

can someone help me how to process 303 response, returning empty body.



final HttpRequest req = new HttpRequest();
req.setEndpoint('https://xxxx.atlassian.net/rest/api/3/attachment/content/10004');
req.setMethod('GET');
Blob headerValue = Blob.valueOf(userName**** + ':' + token****);
String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);
eq.setHeader('Authorization', authorizationHeader);
req.setHeader('Content-Type', 'application/json');

HttpResponse res = new Http().send(req);
print(res.statusCode()) //returning 303

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events