Units API.

See the Weblate's Web API documentation for detailed description of the API.

GET /api/units/13183977/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "translation": "https://l10n.opensuse.org/api/translations/packages-i18n/perl-master/ja/?format=api",
    "source": [
        "An 'HTTP::Message' object contains some headers and a content body. The following methods are available: \n* $mess = HTTP::Message->new \n* $mess = HTTP::Message->new( $headers ) \n* $mess = HTTP::Message->new( $headers, $content )\n\nThis constructs a new message object. Normally you would want construct 'HTTP::Request' or 'HTTP::Response' objects instead.\n\nThe optional $header argument should be a reference to an 'HTTP::Headers' object or a plain array reference of key/value pairs. If an 'HTTP::Headers' object is provided then a copy of it will be embedded into the constructed message, i.e. it will not be owned and can be modified afterwards without affecting the message.\n\nThe optional $content argument should be a string of bytes. \n* $mess = HTTP::Message->parse( $str )\n\nThis constructs a new message object by parsing the given string. \n* $mess->headers\n\nReturns the embedded 'HTTP::Headers' object. \n* $mess->headers_as_string \n* $mess->headers_as_string( $eol )\n\nCall the as_string() method for the headers in the message. This will be the same as\n\n    $mess->headers->as_string\n\nbut it will make your program a whole character shorter :-) \n* $mess->content \n* $mess->content( $bytes )\n\nThe content() method sets the raw content if an argument is given. If no argument is given the content is not touched. In either case the original raw content is returned.\n\nIf the 'undef' argument is given, the content is reset to its default value, which is an empty string.\n\nNote that the content should be a string of bytes. Strings in perl can contain characters outside the range of a byte. The 'Encode' module can be used to turn such strings into a string of bytes. \n* $mess->add_content( $bytes )\n\nThe add_content() methods appends more data bytes to the end of the current content buffer. \n* $mess->add_content_utf8( $string )\n\nThe add_content_utf8() method appends the UTF-8 bytes representing the string to the end of the current content buffer. \n* $mess->content_ref \n* $mess->content_ref( \\$bytes )\n\nThe content_ref() method will return a reference to content buffer string. It can be more efficient to access the content this way if the content is huge, and it can even be used for direct manipulation of the content, for instance:\n\n  ${$res->content_ref} =~ s/\\bfoo\\b/bar/g;\n\nThis example would modify the content buffer in-place.\n\nIf an argument is passed it will setup the content to reference some external source. The content() and add_content() methods will automatically dereference scalar references passed this way. For other references content() will return the reference itself and add_content() will refuse to do anything. \n* $mess->content_charset\n\nThis returns the charset used by the content in the message. The charset is either found as the charset attribute of the 'Content-Type' header or by guessing.\n\nSee http://www.w3.org/TR/REC-html40/charset.html#spec-char-encoding for details about how charset is determined. \n* $mess->decoded_content( %options )\n\nReturns the content with any 'Content-Encoding' undone and, for textual content ('Content-Type' values starting with 'text/', exactly matching 'application/xml', or ending with '+xml'), the raw content's character set decoded into Perl's Unicode string format. Note that this at https://github.com/libwww-perl/HTTP-Message/pull/99 attempt to decode declared character sets for any other content types like 'application/json' or 'application/javascript'. If the 'Content-Encoding' or 'charset' of the message is unknown, this method will fail by returning 'undef'.\n\nThe following options can be specified.\n\n  * 'charset'\n\nThis override the charset parameter for text content. The value 'none' can used to suppress decoding of the charset.\n\n  * 'default_charset'\n\nThis override the default charset guessed by content_charset() or if that fails \"ISO-8859-1\".\n\n  * 'alt_charset'\n\nIf decoding fails because the charset specified in the Content-Type header isn't recognized by Perl's Encode module, then try decoding using this charset instead of failing. The 'alt_charset' might be specified as 'none' to simply return the string without any decoding of charset as alternative.\n\n  * 'charset_strict'\n\nAbort decoding if malformed characters is found in the content. By default you get the substitution character (\"\\x{FFFD}\") in place of malformed characters.\n\n  * 'raise_error'\n\nIf TRUE then raise an exception if not able to decode content. Reason might be that the specified 'Content-Encoding' or 'charset' is not supported. If this option is FALSE, then decoded_content() will return 'undef' on errors, but will still set $@.\n\n  * 'ref'\n\nIf TRUE then a reference to decoded content is returned. This might be more efficient in cases where the decoded content is identical to the raw content as no data copying is required in this case. \n* $mess->decodable \n* HTTP::Message::decodable()\n\nThis returns the encoding identifiers that decoded_content() can process. In scalar context returns a comma separated string of identifiers.\n\nThis value is suitable for initializing the 'Accept-Encoding' request header field. \n* $mess->decode\n\nThis method tries to replace the content of the message with the decoded version and removes the 'Content-Encoding' header. Returns TRUE if successful and FALSE if not.\n\nIf the message does not have a 'Content-Encoding' header this method does nothing and returns TRUE.\n\nNote that the content of the message is still bytes after this method has been called and you still need to call decoded_content() if you want to process its content as a string. \n* $mess->encode( $encoding, ... )\n\nApply the given encodings to the content of the message. Returns TRUE if successful. The \"identity\" (non-)encoding is always supported; other currently supported encodings, subject to availability of required additional modules, are \"gzip\", \"deflate\", \"x-bzip2\" and \"base64\".\n\nA successful call to this function will set the 'Content-Encoding' header.\n\nNote that 'multipart/*' or 'message/*' messages can't be encoded and this method will croak if you try. \n* $mess->parts \n* $mess->parts( @parts ) \n* $mess->parts( \\@parts )\n\nMessages can be composite, i.e. contain other messages. The composite messages have a content type of 'multipart/*' or 'message/*'. This method give access to the contained messages.\n\nThe argumentless form will return a list of 'HTTP::Message' objects. If the content type of $msg is not 'multipart/*' or 'message/*' then this will return the empty list. In scalar context only the first object is returned. The returned message parts should be regarded as read-only (future versions of this library might make it possible to modify the parent by modifying the parts).\n\nIf the content type of $msg is 'message/*' then there will only be one part returned.\n\nIf the content type is 'message/http', then the return value will be either an 'HTTP::Request' or an 'HTTP::Response' object.\n\nIf a @parts argument is given, then the content of the message will be modified. The array reference form is provided so that an empty list can be provided. The @parts array should contain 'HTTP::Message' objects. The @parts objects are owned by $mess after this call and should not be modified or made part of other messages.\n\nWhen updating the message with this method and the old content type of $mess is not 'multipart/*' or 'message/*', then the content type is set to 'multipart/mixed' and all other content headers are cleared.\n\nThis method will croak if the content type is 'message/*' and more than one part is provided. \n* $mess->add_part( $part )\n\nThis will add a part to a message. The $part argument should be another 'HTTP::Message' object. If the previous content type of $mess is not 'multipart/*' then the old content (together with all content headers) will be made part #1 and the content type made 'multipart/mixed' before the new part is added. The $part object is owned by $mess after this call and should not be modified or made part of other messages.\n\nThere is no return value. \n* $mess->clear\n\nWill clear the headers and set the content to the empty string. There is no return value \n* $mess->protocol \n* $mess->protocol( $proto )\n\nSets the HTTP protocol used for the message. The protocol() is a string like 'HTTP/1.0' or 'HTTP/1.1'. \n* $mess->clone\n\nReturns a copy of the message object. \n* $mess->as_string \n* $mess->as_string( $eol )\n\nReturns the message formatted as a single string.\n\nThe optional $eol parameter specifies the line ending sequence to use. The default is \"\\n\". If no $eol is given then as_string will ensure that the returned string is newline terminated (even when the message content is not). No extra newline is appended if an explicit $eol is passed. \n* $mess->dump( %opt )\n\nReturns the message formatted as a string. In void context print the string.\n\nThis differs from '$mess->as_string' in that it escapes the bytes of the content so that it's safe to print them and it limits how much content to print. The escapes syntax used is the same as for Perl's double quoted strings. If there is no content the string \"(no content)\" is shown in its place.\n\nOptions to influence the output can be passed as key/value pairs. The following options are recognized:\n\n  * maxlength => $num\n\nHow much of the content to show. The default is 512. Set this to 0 for unlimited.\n\nIf the content is longer then the string is chopped at the limit and the string \"...\\n(### more bytes not shown)\" appended.\n\n  * no_content => $str\n\nReplaces the \"(no content)\" marker.\n\n  * prefix => $str\n\nA string that will be prefixed to each line of the dump.\n\nAll methods unknown to 'HTTP::Message' itself are delegated to the 'HTTP::Headers' object that is part of every message. This allows convenient access to these methods. Refer to HTTP::Headers for details of these methods:\n\n    $mess->header( $field => $val )     $mess->push_header( $field => $val )     $mess->init_header( $field => $val )     $mess->remove_header( $field )     $mess->remove_content_headers     $mess->header_field_names     $mess->scan( \\&doit )\n\n    $mess->date     $mess->expires     $mess->if_modified_since     $mess->if_unmodified_since     $mess->last_modified     $mess->content_type     $mess->content_encoding     $mess->content_length     $mess->content_language     $mess->title     $mess->user_agent     $mess->server     $mess->from     $mess->referer     $mess->www_authenticate     $mess->authorization     $mess->proxy_authorization     $mess->authorization_basic     $mess->proxy_authorization_basic"
    ],
    "previous_source": "An 'HTTP::Message' object contains some headers and a content body. The following methods are available: \n* $mess = HTTP::Message->new \n* $mess = HTTP::Message->new( $headers ) \n* $mess = HTTP::Message->new( $headers, $content )\n\nThis constructs a new message object. Normally you would want construct 'HTTP::Request' or 'HTTP::Response' objects instead.\n\nThe optional $header argument should be a reference to an 'HTTP::Headers' object or a plain array reference of key/value pairs. If an 'HTTP::Headers' object is provided then a copy of it will be embedded into the constructed message, i.e. it will not be owned and can be modified afterwards without affecting the message.\n\nThe optional $content argument should be a string of bytes. \n* $mess = HTTP::Message->parse( $str )\n\nThis constructs a new message object by parsing the given string. \n* $mess->headers\n\nReturns the embedded 'HTTP::Headers' object. \n* $mess->headers_as_string \n* $mess->headers_as_string( $eol )\n\nCall the as_string() method for the headers in the message. This will be the same as\n\n    $mess->headers->as_string\n\nbut it will make your program a whole character shorter :-) \n* $mess->content \n* $mess->content( $bytes )\n\nThe content() method sets the raw content if an argument is given. If no argument is given the content is not touched. In either case the original raw content is returned.\n\nIf the 'undef' argument is given, the content is reset to its default value, which is an empty string.\n\nNote that the content should be a string of bytes. Strings in perl can contain characters outside the range of a byte. The 'Encode' module can be used to turn such strings into a string of bytes. \n* $mess->add_content( $bytes )\n\nThe add_content() methods appends more data bytes to the end of the current content buffer. \n* $mess->add_content_utf8( $string )\n\nThe add_content_utf8() method appends the UTF-8 bytes representing the string to the end of the current content buffer. \n* $mess->content_ref \n* $mess->content_ref( \\$bytes )\n\nThe content_ref() method will return a reference to content buffer string. It can be more efficient to access the content this way if the content is huge, and it can even be used for direct manipulation of the content, for instance:\n\n  ${$res->content_ref} =~ s/\\bfoo\\b/bar/g;\n\nThis example would modify the content buffer in-place.\n\nIf an argument is passed it will setup the content to reference some external source. The content() and add_content() methods will automatically dereference scalar references passed this way. For other references content() will return the reference itself and add_content() will refuse to do anything. \n* $mess->content_charset\n\nThis returns the charset used by the content in the message. The charset is either found as the charset attribute of the 'Content-Type' header or by guessing.\n\nSee http://www.w3.org/TR/REC-html40/charset.html#spec-char-encoding for details about how charset is determined. \n* $mess->decoded_content( %options )\n\nReturns the content with any 'Content-Encoding' undone and for textual content the raw content encoded to Perl's Unicode strings. If the 'Content-Encoding' or 'charset' of the message is unknown this method will fail by returning 'undef'.\n\nThe following options can be specified.\n\n  * 'charset'\n\nThis override the charset parameter for text content. The value 'none' can used to suppress decoding of the charset.\n\n  * 'default_charset'\n\nThis override the default charset guessed by content_charset() or if that fails \"ISO-8859-1\".\n\n  * 'alt_charset'\n\nIf decoding fails because the charset specified in the Content-Type header isn't recognized by Perl's Encode module, then try decoding using this charset instead of failing. The 'alt_charset' might be specified as 'none' to simply return the string without any decoding of charset as alternative.\n\n  * 'charset_strict'\n\nAbort decoding if malformed characters is found in the content. By default you get the substitution character (\"\\x{FFFD}\") in place of malformed characters.\n\n  * 'raise_error'\n\nIf TRUE then raise an exception if not able to decode content. Reason might be that the specified 'Content-Encoding' or 'charset' is not supported. If this option is FALSE, then decoded_content() will return 'undef' on errors, but will still set $@.\n\n  * 'ref'\n\nIf TRUE then a reference to decoded content is returned. This might be more efficient in cases where the decoded content is identical to the raw content as no data copying is required in this case. \n* $mess->decodable \n* HTTP::Message::decodable()\n\nThis returns the encoding identifiers that decoded_content() can process. In scalar context returns a comma separated string of identifiers.\n\nThis value is suitable for initializing the 'Accept-Encoding' request header field. \n* $mess->decode\n\nThis method tries to replace the content of the message with the decoded version and removes the 'Content-Encoding' header. Returns TRUE if successful and FALSE if not.\n\nIf the message does not have a 'Content-Encoding' header this method does nothing and returns TRUE.\n\nNote that the content of the message is still bytes after this method has been called and you still need to call decoded_content() if you want to process its content as a string. \n* $mess->encode( $encoding, ... )\n\nApply the given encodings to the content of the message. Returns TRUE if successful. The \"identity\" (non-)encoding is always supported; other currently supported encodings, subject to availability of required additional modules, are \"gzip\", \"deflate\", \"x-bzip2\" and \"base64\".\n\nA successful call to this function will set the 'Content-Encoding' header.\n\nNote that 'multipart/*' or 'message/*' messages can't be encoded and this method will croak if you try. \n* $mess->parts \n* $mess->parts( @parts ) \n* $mess->parts( \\@parts )\n\nMessages can be composite, i.e. contain other messages. The composite messages have a content type of 'multipart/*' or 'message/*'. This method give access to the contained messages.\n\nThe argumentless form will return a list of 'HTTP::Message' objects. If the content type of $msg is not 'multipart/*' or 'message/*' then this will return the empty list. In scalar context only the first object is returned. The returned message parts should be regarded as read-only (future versions of this library might make it possible to modify the parent by modifying the parts).\n\nIf the content type of $msg is 'message/*' then there will only be one part returned.\n\nIf the content type is 'message/http', then the return value will be either an 'HTTP::Request' or an 'HTTP::Response' object.\n\nIf a @parts argument is given, then the content of the message will be modified. The array reference form is provided so that an empty list can be provided. The @parts array should contain 'HTTP::Message' objects. The @parts objects are owned by $mess after this call and should not be modified or made part of other messages.\n\nWhen updating the message with this method and the old content type of $mess is not 'multipart/*' or 'message/*', then the content type is set to 'multipart/mixed' and all other content headers are cleared.\n\nThis method will croak if the content type is 'message/*' and more than one part is provided. \n* $mess->add_part( $part )\n\nThis will add a part to a message. The $part argument should be another 'HTTP::Message' object. If the previous content type of $mess is not 'multipart/*' then the old content (together with all content headers) will be made part #1 and the content type made 'multipart/mixed' before the new part is added. The $part object is owned by $mess after this call and should not be modified or made part of other messages.\n\nThere is no return value. \n* $mess->clear\n\nWill clear the headers and set the content to the empty string. There is no return value \n* $mess->protocol \n* $mess->protocol( $proto )\n\nSets the HTTP protocol used for the message. The protocol() is a string like 'HTTP/1.0' or 'HTTP/1.1'. \n* $mess->clone\n\nReturns a copy of the message object. \n* $mess->as_string \n* $mess->as_string( $eol )\n\nReturns the message formatted as a single string.\n\nThe optional $eol parameter specifies the line ending sequence to use. The default is \"\\n\". If no $eol is given then as_string will ensure that the returned string is newline terminated (even when the message content is not). No extra newline is appended if an explicit $eol is passed. \n* $mess->dump( %opt )\n\nReturns the message formatted as a string. In void context print the string.\n\nThis differs from '$mess->as_string' in that it escapes the bytes of the content so that it's safe to print them and it limits how much content to print. The escapes syntax used is the same as for Perl's double quoted strings. If there is no content the string \"(no content)\" is shown in its place.\n\nOptions to influence the output can be passed as key/value pairs. The following options are recognized:\n\n  * maxlength => $num\n\nHow much of the content to show. The default is 512. Set this to 0 for unlimited.\n\nIf the content is longer then the string is chopped at the limit and the string \"...\\n(### more bytes not shown)\" appended.\n\n  * no_content => $str\n\nReplaces the \"(no content)\" marker.\n\n  * prefix => $str\n\nA string that will be prefixed to each line of the dump.\n\nAll methods unknown to 'HTTP::Message' itself are delegated to the 'HTTP::Headers' object that is part of every message. This allows convenient access to these methods. Refer to HTTP::Headers for details of these methods:\n\n    $mess->header( $field => $val )     $mess->push_header( $field => $val )     $mess->init_header( $field => $val )     $mess->remove_header( $field )     $mess->remove_content_headers     $mess->header_field_names     $mess->scan( \\&doit )\n\n    $mess->date     $mess->expires     $mess->if_modified_since     $mess->if_unmodified_since     $mess->last_modified     $mess->content_type     $mess->content_encoding     $mess->content_length     $mess->content_language     $mess->title     $mess->user_agent     $mess->server     $mess->from     $mess->referer     $mess->www_authenticate     $mess->authorization     $mess->proxy_authorization     $mess->authorization_basic     $mess->proxy_authorization_basic",
    "target": [
        "'HTTP::Message'オブジェクトには、いくつかのヘッダーとコンテンツ本体が含まれています。これは新しいメッセージ・オブジェクトを構成します。\n* $mess = HTTP::Message->new \n* $mess = HTTP::Message->new( $headers ) \n* $mess = HTTP::Message->new( $headers, $content )\n\nThis constructs a new message object. 通常は、代わりに'HTTP::Request'または'HTTP::Response'オブジェクトを作成します。\n\nオプションの$header引数は、'HTTP::Headers'オブジェクトへの参照か、キーと値のペアのプレーンな配列参照でなければなりません。'HTTP::Headers'オブジェクトが提供された場合、そのコピーは構築されたメッセージに埋め込まれます。つまり、そのオブジェクトは所有されず、メッセージに影響を与えずに後で変更できます。\n\nオプションの$content引数は、バイトの文字列でなければなりません。\n* $mess = HTTP::Message->parse( $str )\n\nこれは、指定された文字列を解析して新しいメッセージオブジェクトを作成します。\n* $mess->headers\n\n埋め込まれた'HTTP::Headers'オブジェクトを返します。\n* $mess->headers_as_string \n* $mess->headers_as_string( $eol )\n\nメッセージ内のヘッダーに対してas_string()メソッドを呼び出します。これは次と同じです。\n\n    $mess->headers->as_string\n\nプログラム全体が短くなります :-)\n* $mess->content \n* $mess->content( $bytes )\n\n引数が与えられた場合、content()メソッドは生の内容を設定します。引数を指定しない場合、内容には影響しません。いずれの場合も、元の未加工のコンテンツが返されます。\n\n'undef' 引数を指定すると、内容はデフォルト値(空の文字列)にリセットされます。\n\n内容はバイトの文字列でなければならないことに注意してください。perlの文字列には、バイトの範囲外の文字を含めることができます。'Encode'モジュールは、このような文字列をバイト文字列に変換するために使用できます。\n* $mess->add_content( $bytes )\n\nadd_content() メソッドは、現在のコンテンツバッファの末尾にさらにデータバイトを追加します。\n* $mess->add_content_utf8($string)\n\nadd_content_utf8()メソッドは、文字列を表すUTF-8バイトを現在のコンテンツ・バッファの末尾に追加します。\n* $mess->content_ref\n* $mess->content_ref(\\$bytes)\n\ncontent_ref()メソッドは、コンテンツバッファ文字列への参照を返します。コンテンツが巨大な場合は、この方法でコンテンツにアクセスする方が効率的です。また、コンテンツを直接操作するために使用することもできます。次に例を示します。\n\n  ${$res->content_ref} =~ s/\\bfoo\\b/bar/g;\n\nこの例では、コンテンツバッファをインプレイス修正します。\n\n引数が渡されると、何らかの外部ソースを参照するようにコンテンツが設定されます。content()メソッドとadd_content()メソッドは、この方法で渡されたスカラー参照を自動的に逆参照します。その他の参照では、content()は参照そのものを返し、add_content()は何もしません。\n* $mess->content_charset\n\nメッセージの内容で使用されている文字セットを返します。charsetは、'Content-Type'ヘッダのcharset属性として、あるいは推測によって見つけられます。\n\n文字セットの決定方法の詳細については、http://www.w3.org/TR/REC-html40/charset.html#spec-char-encodingを参照してください。\n* $mess->decoded_content( %options )\n\n「Content-Encoding」を元に戻したコンテンツと、テキストコンテンツ(「Content-Type」の値が「text/」で始まる場合、「application/xml」と完全に一致する場合、または「+xml」で終わる場合)については、生のコンテンツの文字セットをPerlのUnicode文字列フォーマットにデコードしたものを返します。https://github.com/libwww-perl/HTTP-Message/pull/99 のこのコマンドは、'application/json'や'application/javascript' などの他のコンテンツ・タイプ用に宣言された文字セットをデコードしようとします。メッセージの'Content-Encoding'または'charset'が不明な場合、このメソッドは'undef'を返して失敗します。\n\n以下のオプションを指定できます。\n\n  * 'charset'\n\nこれにより、テキストコンテンツのcharsetパラメータが上書きされます。値'none'を使用すると、文字セットのデコードを抑制できます。\n\n  * 'default_charset'\n\nこれはcontent_charset()や\"ISO-8859-1\"に失敗した場合に推測されるデフォルトの文字セットを上書きします。\n\n  * 'alt_charset'\n\nContent-Typeヘッダーで指定された文字セットがPerlのEncodeモジュールで認識されないためにデコードが失敗した場合は、失敗するのではなく、この文字セットを使用してデコードを試みてください。'alt_charset'に'none'を指定すると、charsetをデコードせずに文字列を返すことができます。\n\n  * 'charset_strict'\n\n不正な文字がコンテンツ内に見つかった場合、デコードを中止します。デフォルトでは、不正な文字の代わりに置換文字(\"\\x{FFFD}\")が得られます。\n\n  * 'raise_error'\n\nTRUEの場合、コンテンツをデコードできない場合は例外を発生させます。指定された'Content-Encoding'または'charset'がサポートされていない可能性があります。このオプションがFALSEの場合、decoded_content()はエラー時に'undef'を返しますが、$@を設定します。\n\n  * 'ref'\n\nTRUEの場合、デコードされた内容への参照が返されます。これは、デコードされたコンテンツが生のコンテンツと同一である場合には、データコピーを必要としないので、より効率的であり得ます。\n* $mess->decodable\n* HTTP::Message::decodeable()\n\ndecoded_content()が処理できるエンコード識別子を返します。スカラコンテキストでは、カンマで区切られた識別子の文字列を返します。\n\nこの値は、「Accept-Encoding」リクエストヘッダフィールドを初期化するのに適しています。\n* $mess->decode\n\nこのメソッドは、メッセージの内容をデコードされたバージョンで置き換え、'Content-Encoding'ヘッダーを削除します。成功した場合はTRUEを返し、失敗した場合はFALSEを返します。\n\nメッセージに'Content-Encoding'ヘッダーがない場合、このメソッドは何もせず、TRUEを返します。\n\nこのメソッドが呼び出された後もメッセージの内容はバイトのままであり、その内容を文字列として処理したい場合はdecoded_content()を呼び出す必要があることに注意してください。\n* $mess->encode( $encoding, ... )\n\n指定されたエンコーディングをメッセージの内容に適用します。成功した場合はTRUEを返します。\"identity\" (非)エンコーディングは常にサポートされています。現在サポートされているその他のエンコーディングは、必要な追加モジュールが利用可能であることを条件として、\"gzip\"、\"deflate\"、\"x-bzip2\"、\"base64\"です。\n\nこの関数の呼び出しに成功すると、「Content-Encoding」ヘッダが設定されます。\n\n'multipart/*'や'message/*'メッセージはエンコードできないので、このメソッドを使おうとするとエラーが発生することに注意してください。\n* $mess->parts \n* $mess->parts( @parts ) \n* $mess->parts( \\@parts )\n\nメッセージは複合メッセージ、つまり他のメッセージを含むことができます。複合メッセージの内容タイプは、「multipart/*」または「message/*」です。このメソッドは、含まれているメッセージへのアクセスを提供します。\n\n引数のない形式は'HTTP::Message'オブジェクトのリストを返します。$msgの内容タイプが'multipart/*'または'message/*'でない場合、空のリストを返します。スカラコンテキストでは、最初のオブジェクトのみが返されます。返されたメッセージ部分は読み取り専用とみなすべきです(このライブラリの将来のバージョンでは、部分を修正することで親を修正できるようになる可能性があります)。\n\n$msgの内容タイプが'message/*'の場合、返される部分は1つだけです。\n\nコンテンツタイプが「message/http」の場合、戻り値は「HTTP::Request」または「HTTP::Response」オブジェクトのいずれかになります。\n\n@parts 引数を指定すると、メッセージの内容が変更されます。配列参照フォームが提供されているので、空のリストを提供できます。@parts 配列には'HTTP::Message'オブジェクトを含める必要があります。@parts オブジェクトはこの呼び出し後に$messによって所有されるので、変更したり他のメッセージの一部にしたりすべきではありません。\n\nこのメソッドでメッセージを更新し、$messの古いコンテンツタイプが'multipart/*'または'message/*'でない場合、コンテンツタイプは'multipart/mixed'に設定され、他のすべてのコンテンツヘッダーはクリアされます。\n\nコンテンツタイプが「message/*」で、複数のパートが指定されている場合、このメソッドはクラッシュします。\n* $mess->add_part( $part )\n\nメッセージにパーツを追加します。$part 引数は別の'HTTP::Message'オブジェクトである必要があります。$messの以前のコンテンツタイプが'multipart/*'でなければ、古いコンテンツ(すべてのコンテンツヘッダとともに)はpart#1になり、コンテンツタイプは'multipart/mixed'になってから新しいパートが追加されます。$partオブジェクトはこの呼び出し後に$messによって所有されるので、変更したり他のメッセージの一部にしたりすべきではありません。\n\n戻り値はありません。\n*$mess->clear\n\nは、ヘッダーをクリアし、内容を空の文字列に設定します。There is no return value \n* $mess->protocol \n* $mess->protocol( $proto )\n\nメッセージに使用されるHTTPプロトコルを設定します。protocol() は 'HTTP/1.0'や'HTTP/1.1'のような文字列です。\n*$mess->clone\n\nメッセージオブジェクトのコピーを返します。\n* $mess->as_string \n* $mess->as_string( $eol )\n\n1つの文字列としてフォーマットされたメッセージを返します。\n\nオプションの$eolパラメータは、使用する行の終了シーケンスを指定します。デフォルトは「\\n」です。$eolが指定されていない場合、as_stringは返された文字列が改行で終了していることを保証します(メッセージの内容が改行でない場合でも)。明示的な$eolが渡された場合、余分な改行は追加されません。\n* $mess->dump(%opt)\n\n文字列形式のメッセージを返します。voidコンテキストでは文字列を出力します。\n\nこれは'$mess->as_string'とは異なり、内容のバイト数をエスケープして安全に印刷できるようにし、印刷する内容の量を制限します。使用されるエスケープ構文は、Perlの二重引用符で囲まれた文字列と同じです。内容がない場合は、代わりに「(内容なし)」という文字列が表示されます。\n\n出力に影響を与えるオプションは、キーと値のペアとして渡すことができます。次のオプションが認識されます:\n\n  * maxlength => $num\n\n表示するコンテンツの量。デフォルトは512です。無制限の場合は0に設定します。\n\n内容が長い場合、文字列は制限値で切り捨てられ、文字列\"...\\n(### それ以上のバイトは表示しません)\"が追加されます。\n\n  * no_content=>$str\n\n「(内容なし)」マーカーを置き換えます。\n\n  * prefix => $str\n\nダンプの各行の先頭に付ける文字列。\n\n'HTTP::Message'自身が知らないすべてのメソッドは、すべてのメッセージの一部である'HTTP::Headers'オブジェクトに委譲されます。これにより、これらのメソッドへのアクセスが便利になります。これらのメソッドの詳細については、「HTTP::Headers」を参照してください:\n\n    $mess->header( $field => $val )     $mess->push_header( $field => $val )     $mess->init_header( $field => $val )     $mess->remove_header( $field )     $mess->remove_content_headers     $mess->header_field_names     $mess->scan( \\&doit )\n\n    $mess->date     $mess->expires     $mess->if_modified_since     $mess->if_unmodified_since     $mess->last_modified     $mess->content_type     $mess->content_encoding     $mess->content_length     $mess->content_language     $mess->title     $mess->user_agent     $mess->server     $mess->from     $mess->referer     $mess->www_authenticate     $mess->authorization     $mess->proxy_authorization     $mess->authorization_basic     $mess->proxy_authorization_basic"
    ],
    "id_hash": -8084052954342746829,
    "content_hash": -8084052954342746829,
    "location": "",
    "context": "",
    "note": "tumbleweed/perl-HTTP-Message/description",
    "flags": "",
    "labels": [],
    "state": 20,
    "fuzzy": false,
    "translated": true,
    "approved": false,
    "position": 2565,
    "has_suggestion": false,
    "has_comment": false,
    "has_failing_check": false,
    "num_words": 1565,
    "source_unit": "https://l10n.opensuse.org/api/units/13182503/?format=api",
    "priority": 100,
    "id": 13183977,
    "web_url": "https://l10n.opensuse.org/translate/packages-i18n/perl-master/ja/?checksum=0fcfacab4ef41533",
    "url": "https://l10n.opensuse.org/api/units/13183977/?format=api",
    "explanation": "",
    "extra_flags": "",
    "pending": false,
    "timestamp": "2022-02-23T16:53:44.585555Z"
}