28 строки
2.0 KiB
YAML
28 строки
2.0 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.core.annotation.BodyParam"
|
|
fullName: "com.azure.core.annotation.BodyParam"
|
|
name: "BodyParam"
|
|
nameWithType: "BodyParam"
|
|
summary: "Annotation to annotate a parameter to send to a REST endpoint as HTTP Request content."
|
|
syntax: "public interface **BodyParam**</br> implements <a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html\">Annotation</a>"
|
|
methods:
|
|
- uid: "com.azure.core.annotation.BodyParam.value()"
|
|
fullName: "com.azure.core.annotation.BodyParam.value()"
|
|
name: "value()"
|
|
nameWithType: "BodyParam.value()"
|
|
summary: "Gets the Content-Type for the body."
|
|
modifiers:
|
|
- "abstract"
|
|
syntax: "public abstract String value()"
|
|
desc: "Gets the Content-Type for the body."
|
|
returns:
|
|
description: "The Content-Type for the body."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
type: "interface"
|
|
desc: "Annotation to annotate a parameter to send to a REST endpoint as HTTP Request content.\n\nIf the parameter type extends `InputStream`, this payload is streamed to server through \"application/octet-stream\". Otherwise, the body is serialized first and sent as \"application/json\" or \"application/xml\", based on the serializer.\n\n**Example 1: Put JSON**\n\n```java\n@Put(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/\"\n + \"virtualMachines/{vmName}\")\n VirtualMachine createOrUpdate(@PathParam(\"resourceGroupName\") String rgName,\n @PathParam(\"vmName\") String vmName,\n @PathParam(\"subscriptionId\") String subscriptionId,\n @BodyParam(\"application/json\") VirtualMachine vm);\n```\n\n**Example 2: Stream**\n\n```java\n@Post(\"formdata/stream/uploadfile\")\n void uploadFileViaBody(@BodyParam(\"application/octet-stream\") FileInputStream fileContent);\n```"
|
|
implements:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html\">Annotation</a>"
|
|
metadata: {}
|
|
package: "com.azure.core.annotation"
|
|
artifact: com.azure:azure-core:1.54.0
|