<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="SoupCutClient">
<refmeta>
<refentrytitle role="top_of_page" id="SoupCutClient.top_of_page">便利なHTTPクライアントAPI</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>Cutterライブラリ</refmiscinfo>
</refmeta>
<refnamediv>
<refname>便利なHTTPクライアントAPI</refname>
<refpurpose>HTTPクライアントとして動作するためのAPI。</refpurpose>
</refnamediv>

<refsect1 id="SoupCutClient.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="SoupCutClient"><returnvalue>SoupCutClient</returnvalue></link> *
</entry><entry role="function_name"><link linkend="soupcut-client-new">soupcut_client_new</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="soupcut-client-set-base">soupcut_client_set_base</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="soupcut-client-send-message">soupcut_client_send_message</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="soupcut-client-get">soupcut_client_get</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="soupcut-client-get-n-messages">soupcut_client_get_n_messages</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="SoupMessage"><returnvalue>SoupMessage</returnvalue></link> *
</entry><entry role="function_name"><link linkend="soupcut-client-get-latest-message">soupcut_client_get_latest_message</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GMainContext"><returnvalue>GMainContext</returnvalue></link> *
</entry><entry role="function_name"><link linkend="soupcut-client-get-async-context">soupcut_client_get_async_context</link> <phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="SoupCutClient.properties" role="properties">
<title role="properties.title">プロパティ</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="SoupCutClient--async">async</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="SoupCutClient.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">オブジェクト階層</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">╰──</phrase> SoupCutClient
</screen>
</refsect1>


<refsect1 id="SoupCutClient.description" role="desc">
<title role="desc.title">説明</title>
<para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクトはHTTPクライアントとして動作します。<link linkend="SoupCutClient"><type>SoupCutClient</type></link>は複数のリクエストやレスポンスを管理することができます。また、<link linkend="SoupCutClient"><type>SoupCutClient</type></link>に関連するアサーションのAPIも提供しています。</para>

</refsect1>
<refsect1 id="SoupCutClient.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="soupcut-client-new" role="function" condition="since:1.0.8">
<title>soupcut_client_new ()</title>
<indexterm zone="soupcut-client-new" role="1.0.8"><primary>soupcut_client_new</primary></indexterm>
<programlisting language="C"><link linkend="SoupCutClient"><returnvalue>SoupCutClient</returnvalue></link> *
soupcut_client_new (<parameter><type>void</type></parameter>);</programlisting>
<para>新たに<link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクトを生成して返します。</para>
<refsect3 role="returns">
<title>Returns</title>
<para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para>
<para/>
</refsect3><para role="since">1.0.8から</para></refsect2>
<refsect2 id="soupcut-client-set-base" role="function" condition="since:1.0.8">
<title>soupcut_client_set_base ()</title>
<indexterm zone="soupcut-client-set-base" role="1.0.8"><primary>soupcut_client_set_base</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
soupcut_client_set_base (<parameter><link linkend="SoupCutClient"><type>SoupCutClient</type></link> *client</parameter>,
                         <parameter>const <link linkend="gchar"><type>gchar</type></link> *uri</parameter>);</programlisting>
<para>Set <parameter>uri</parameter>
 as a base uri of <parameter>client</parameter>
.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>uri</para></entry>
<entry role="parameter_description"><para>ベースURIの文字列。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">1.0.8から</para></refsect2>
<refsect2 id="soupcut-client-send-message" role="function" condition="since:1.0.8">
<title>soupcut_client_send_message ()</title>
<indexterm zone="soupcut-client-send-message" role="1.0.8"><primary>soupcut_client_send_message</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
soupcut_client_send_message (<parameter><link linkend="SoupCutClient"><type>SoupCutClient</type></link> *client</parameter>,
                             <parameter><link linkend="SoupMessage"><type>SoupMessage</type></link> *message</parameter>);</programlisting>
<para>Send <parameter>message</parameter>
 with <parameter>client</parameter>
. <parameter>client</parameter>
 remebers all the messages it sent.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>message</para></entry>
<entry role="parameter_description"><para><link linkend="SoupMessage"><type>SoupMessage</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>レスポンスのステータスコード。</para>
<para/>
</refsect3><para role="since">1.0.8から</para></refsect2>
<refsect2 id="soupcut-client-get" role="function" condition="since:1.0.8">
<title>soupcut_client_get ()</title>
<indexterm zone="soupcut-client-get" role="1.0.8"><primary>soupcut_client_get</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
soupcut_client_get (<parameter><link linkend="SoupCutClient"><type>SoupCutClient</type></link> *client</parameter>,
                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *uri</parameter>,
                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *first_query_name</parameter>,
                    <parameter>...</parameter>);</programlisting>
<para>Send a GET request to <parameter>uri</parameter>
 with queries. If the base URI of <parameter>client</parameter>

is set by <link linkend="soupcut-client-set-base"><function>soupcut_client_set_base()</function></link>, the destination URI is composed of the base URI and <parameter>uri</parameter>
. If not, <parameter>uri</parameter>
 must be a fully qualified URI.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>uri</para></entry>
<entry role="parameter_description"><para>URI文字列。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>first_query_name</para></entry>
<entry role="parameter_description"><para>ひとつめのクエリパラメータの名前</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>pairs of query parameter names and values, starting with <parameter>first_query_name</parameter>
, terminated by <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>レスポンスのステータスコード。</para>
<para/>
</refsect3><para role="since">1.0.8から</para></refsect2>
<refsect2 id="soupcut-client-get-n-messages" role="function" condition="since:1.0.8">
<title>soupcut_client_get_n_messages ()</title>
<indexterm zone="soupcut-client-get-n-messages" role="1.0.8"><primary>soupcut_client_get_n_messages</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
soupcut_client_get_n_messages (<parameter><link linkend="SoupCutClient"><type>SoupCutClient</type></link> *client</parameter>);</programlisting>
<para><parameter>client</parameter>が送信した#SoupMessageの数。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>SoupMessageの数。</para>
<para/>
</refsect3><para role="since">1.0.8から</para></refsect2>
<refsect2 id="soupcut-client-get-latest-message" role="function" condition="since:1.0.8">
<title>soupcut_client_get_latest_message ()</title>
<indexterm zone="soupcut-client-get-latest-message" role="1.0.8"><primary>soupcut_client_get_latest_message</primary></indexterm>
<programlisting language="C"><link linkend="SoupMessage"><returnvalue>SoupMessage</returnvalue></link> *
soupcut_client_get_latest_message (<parameter><link linkend="SoupCutClient"><type>SoupCutClient</type></link> *client</parameter>);</programlisting>
<para><parameter>client</parameter>が最後に送信した<link linkend="SoupMessage"><type>SoupMessage</type></link>オブジェクト。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>最後に送信された<link linkend="SoupMessage"><type>SoupMessage</type></link>オブジェクト。</para>
<para/>
</refsect3><para role="since">1.0.8から</para></refsect2>
<refsect2 id="soupcut-client-get-async-context" role="function" condition="since:1.0.8">
<title>soupcut_client_get_async_context ()</title>
<indexterm zone="soupcut-client-get-async-context" role="1.0.8"><primary>soupcut_client_get_async_context</primary></indexterm>
<programlisting language="C"><link linkend="GMainContext"><returnvalue>GMainContext</returnvalue></link> *
soupcut_client_get_async_context (<parameter><link linkend="SoupCutClient"><type>SoupCutClient</type></link> *client</parameter>);</programlisting>
<para>Returns the asynch_context of <parameter>client</parameter>
.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="SoupCutClient"><type>SoupCutClient</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a <link linkend="GMainContext"><type>GMainContext</type></link> of <parameter>client</parameter>
, which may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<para/>
</refsect3><para role="since">1.0.8から</para></refsect2>

</refsect1>
<refsect1 id="SoupCutClient.other_details" role="details">
<title role="details.title">Types and Values</title>

</refsect1>
<refsect1 id="SoupCutClient.property-details" role="property_details">
<title role="property_details.title">プロパティ詳細</title>
<refsect2 id="SoupCutClient--async" role="property"><title>The <literal>“async”</literal> property</title>
<indexterm zone="SoupCutClient--async"><primary>SoupCutClient:async</primary></indexterm>
<programlisting>  “async”                    <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>セッションが非同期の場合は真。</para><para>Flags: Read / Write</para>
<para>デフォルト値: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="SoupCutClient.see-also">
<title>参考</title>
<para><link linkend="cutter-Assertions-for-HTTP-client-and-server">HTTPクライアント・サーバ用の検証</link></para>

</refsect1>

</refentry>
