---
schema: rendered-html/v1
title: "Response | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/v1-Response.html
generated_at: 2026-06-11T15:19:23.230300+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- JavaScript Workflow Quick Start Guide
- Create a Workflow
- Edit a Workflow
- Workflow Rule Types
- Transactions
- Use Cases for Workflows
- Web-based Workflow Editor
- Using an External Code Editor
- Default Workflows
- Custom Workflow Repository
- JavaScript Workflow Reference
- Rule-specific Properties
- Context
- Requirements
- Using the Workflow API
- Building Integrations with Slack
- Using REST API Methods in JavaScript Workflows
- Working with Dates and Times
- Working with Periods
- Localized Workflow Messages
- Troubleshooting Workflows
- Remote Debugger
- YouTrack Workflow API
- Change Log
- date-time
- entities
- http
- Connection
- REQUEST\_TYPES
- [Response](v1-Response.html)
- license
- notifications
- search
- strings
- workflow
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Hub REST API

1. YouTrack Workflows
2. JavaScript Workflow Reference
3. YouTrack Workflow API
4. http
5. [Response](#0)

# Response﻿

Last modified: 07 May 2026

A class that creates a definition for an HTTP response. If an exception occurs during processing, most of the properties in the response object are empty.

// Gets the content of a PasteBin paste, assuming that we have received its key (`pasteBinKey`) in a prior request.
const http = require('@jetbrains/youtrack-scripting-api/http');
const connection = new http.Connection('http://pastebin.com/raw/');
connection.addHeader({name: 'Content-Type', value: 'text/plain'});
const response = connection.getSync(pasteBinKey, '');
if (response && response.code === 200) {
  let text = '';
  response.headers.forEach(function(header) {
    text += header.name + ': ' + header.value + '\n';
  });
  text += '\n' + response.response;
  issue.addComment(text);
}

## Properties﻿

| Name | Type | Description |
| code | number | The HTTP status code that is assigned to the response. If an exception occurs during processing, the property is empty. |
| exception | Object | The exception that occurred during processing. |
| headers | Array.<{name: String, value: String}> | A collection of response headers. If an exception occurs during processing, the collection is empty. |
| isSuccess | boolean | An indication of the success or failure for the request. If the HTTP status code is between 200 (inclusive) and 400 (exclusive), this property is set to 'true'. |
| response | string | The response body. If an exception occurs during processing, the response body is empty (null). |
| responseAsStream | Object | A byte stream representation of the response body. If an exception occurs during processing, the property is empty (null). |

- [Response](/help/youtrack/devportal/v1-Response.html)
- [Properties](/help/youtrack/devportal/v1-Response.html#properties)

REQUEST\_TYPESlicense

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.

![](https://bat.bing.com/action/0?ti=5220035&tm=gtm002&Ver=2&mid=746f891e-54ec-408a-af93-147638b37645&bo=4&sid=452929b065a111f19a7fe7356f74a419&vid=aa3122f0648711f1a10d6d095e10fd87&vids=0&msclkid=N&pi=918639831&lg=en-US&sw=1920&sh=1080&sc=24&tl=Response%20%7C%20Developer%20Portal%20for%20YouTrack%20and%20Hub%20Documentation&p=https%3A%2F%2Fwww.jetbrains.com%2Fhelp%2Fyoutrack%2Fdevportal%2Fv1-Response.html&r=&lt=795&pt=1781191151659,31,31,,,1,1,1,1,1,,2,25,26,33,218,218,218,794,795,795&pn=0,0&evt=pageLoad&sv=2&asc=G&cdb=AQAS&rn=36478)
