uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

entity(Object entity, String type) method

Description

This method sets the MIME media type of an HTTP request entity.

For the Java types available for an HTTP request entity, see 25.15.1 Combination of Java types and MIME media types available for an HTTP request entity. You can use the GenericEntity object to specify generics in the entity.

Syntax

public WebResource.Builder entity(Object entity,

String type)

Parameters

entity
This is an HTTP request entity.

type
This is a MIME media type.

Return value

The method returns a builder (WebResource.Builder object).

Notes