com.atlassian.sal.api.net.Request.setRequestBody()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(215)

本文整理了Java中com.atlassian.sal.api.net.Request.setRequestBody方法的一些代码示例,展示了Request.setRequestBody的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setRequestBody方法的具体详情如下:
包路径:com.atlassian.sal.api.net.Request
类名称:Request
方法名:setRequestBody

Request.setRequestBody介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.plugins.rest/atlassian-rest-module

public JerseyRequest setRequestBody(String requestBody, String contentType) {
  delegateRequest.setRequestBody(requestBody, contentType);
  return this;
}

代码示例来源:origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
public JerseyRequest setRequestBody(final String s) {
  delegateRequest.setRequestBody(s);
  return this;
}

代码示例来源:origin: com.atlassian.applinks/applinks-plugin-core

public ApplicationLinkRequest setRequestBody(final String requestBody, final String contentType)
{
  return setDelegate(request.setRequestBody(requestBody, contentType));
}

代码示例来源:origin: com.atlassian.applinks/applinks-plugin-core

public ApplicationLinkRequest setRequestBody(String requestBody)
{
  return setDelegate(request.setRequestBody(requestBody));
}

代码示例来源:origin: com.atlassian.applinks/applinks-common

public ApplicationLinkRequest setRequestBody(String requestBody) {
  return setDelegate(request.setRequestBody(requestBody));
}

代码示例来源:origin: com.atlassian.applinks/applinks-common

public ApplicationLinkRequest setRequestBody(final String requestBody, final String contentType) {
  return setDelegate(request.setRequestBody(requestBody, contentType));
}

代码示例来源:origin: com.atlassian.labs/speakeasy-plugin

request.setRequestBody(str);

代码示例来源:origin: com.atlassian.notifier/notifier-core

request.setRequestBody(data, "text/xml");
if (log.isDebugEnabled())

代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin

@Override
protected String doExecute() throws Exception
{
  String crucibleUrl = getCrucibleUrl();
  if (crucibleUrl == null)
  {
    return SUCCESS;
  }
  Request<?> request = requestFactory.createRequest(Request.MethodType.PUT,
    crucibleUrl + CRUCIBLE_METRICS_REST_ENDPOINT);
  request.addTrustedTokenAuthentication(themeProperties.getSystemAdministrator());
  request.setRequestBody(metrics);
  try
  {
    metrics = request.execute();
  }
  catch (ResponseException re)
  {
    addErrorMessage(getText("crucible.admin.error.response"));
    log.error("Error communicating with Crucible", re);
  }
  return getRedirect("EditMetrics!Default.jspa?message=crucible.admin.info.metrics.updated");
}

代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin

@Override
protected String doExecute() throws Exception
{
  if (!hasAdministratePermissionOnProject(key))
  {
    return SECURITY_BREACH;
  }
  ApplicationLink appLink = appLinksManager.getLinkedApplication(Application.CRUCIBLE.name(), key);
  Request<?> request = requestFactory.createRequest(Request.MethodType.PUT, getRestResource(appLink));
  request.addTrustedTokenAuthentication(themeProperties.getSystemAdministrator());
  request.setRequestBody(XStreamUtils.toXML(projectConfig));
  try
  {
    request.execute();
  }
  catch (ResponseException re)
  {
    addErrorMessage(re.getMessage());
    log.error("Error putting crucible project config", re);
    return INPUT;
  }
  return getRedirect("CrucibleProject!ListProjects.jspa?message=crucible.admin.info.updated");
}

代码示例来源:origin: com.atlassian.applinks/applinks-jira-plugin

public String doSynchronize()
{
  final ApplicationLink localLink = appLinksManager.getLinkedApplication(app, getKey());
  final String restUrl = localLink.getUrl() + "/plugins/servlet/applinks/projectlinks";
  final Request<?> request = requestFactory.createRequest(Request.MethodType.POST,
    restUrl + "?key=" + localLink.getRemoteKey() + "&application=JIRA");
  final ApplicationLink remoteLink = new DefaultApplicationLink("jira", getKey(), null, null);
  request.setRequestBody(XStreamUtils.toXML(remoteLink));
  request.addTrustedTokenAuthentication();
  try
  {
    request.execute();
  }
  catch (final ResponseException re)
  {
    return getRedirect("ViewProject.jspa?message=editprojectlinks.error.synchronize&pid=" + getPid());
  }
  return getRedirect("ViewProject.jspa?message=editprojectlinks.result.synchronized&pid=" + getPid());
}

代码示例来源:origin: com.atlassian.applinks/applinks-confluence-plugin

final Request<?> request = createRequest(localLink, restUrl);
final ApplicationLink remoteLink = new DefaultApplicationLink("jira", getKey(), null, null);
request.setRequestBody(XStreamUtils.toXML(remoteLink));
request.addTrustedTokenAuthentication();
try

相关文章