エンコード

それは意味します Mimeタイプ 応答/リクエスト本文/引数のコンテンツの詳細。

可能な場所

  • 熱 意/ヘルプ/ zest -仕様ファイル/コンテンツ/紹介/">コンテンツ

属性

お名前 タイプ 説明
タイプ

必須

文字列 コンテンツの種類。 参照 こちら サンプルエンコードタイプ用。

サンプル

json

応答本文の内容をエンコードしたいと仮定してみましょう。 json 旅行リソース。 したがって、エンコードを記述する必要があります。 熱 意/ヘルプ/ zest -仕様ファイル/url/操作/応答/"> として、

copy

<content>
 <encode type="application/json" />
 <structure>
 <property name="trips" type ="collections">
 <structure>
 <property name="trip_name" type="string"/>
 <property name="destination" type="string"/>
 <property name="start_time" type="datetime"/>
 <property name="end_time" type="datetime"/>
 <property name="no_of_days" type="string"/>
 </structure>
 </property>
 </structure>
 </content>

マルチパートフォームデータ

宛先リソースでは、 フォームデータ エンコードタイプ 熱 意/ヘルプ/ zest -指定ファイル/url/操作/要求ボディ/"> . 以下は、リクエスト本文の詳細です。

copy

  • destination_name: Accepts only String values.

  • image: Accepts only png files.

  • The file name should contain only alphabets and a maximum of two files can be uploaded.

  • Each file size should fall between 500 to 1000 bytes.

次に、ここに示すようにリクエスト本文を書きます。

copy

<request-body>
 <content>
 <encode type="multipart/form-data" />
 <structure>
 <property name="destination_name" type="string"/>
 <property name="image" type="file" length="2">
 <file-meta overall-size="2000">
 <extension name="png" size="500,1000"/>
 <file-name regex="^[a-zA-Z]+$"/>
 </file-meta>
 </property>
 </structure>
 </content>
 </request-body>

Last Updated 2026-02-06 15:55:45 +0530 IST