<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: php curl and data input for standard api curls in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401158#M21959</link>
    <description>&lt;P&gt;There are a few different formats for&amp;nbsp;Dropbox API v2 endpoints, documented here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#formats" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#formats&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For example,&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata" target="_self"&gt;/2/files/get_metadata&lt;/A&gt; uses the "RPC" format, so it requires the parameters as JSON in the request body. Exactly how you set that will depend on your HTTPS client, but for curl in PHP I believe that's done via the 'CURLOPT_POSTFIELDS' option.&lt;/P&gt;
&lt;P&gt;For a different example, the&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_self"&gt;/2/files/download&lt;/A&gt; endpoint use the "content-download" format, so it expects the&amp;nbsp;parameters as JSON in the 'Dropbox-API-Arg' request header.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Mar 2020 19:06:11 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-03-06T19:06:11Z</dc:date>
    <item>
      <title>php curl and data input for standard api curls</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/400983#M21951</link>
      <description>&lt;P&gt;I know about the authorization and Content Type headers for each curl request I do to the api. But, when I am required to provide data when the require Content Type is application/json, should I include the data in a json encoded array with my http header, or should I reserve this json encoded array for the post fields setopt of the curl?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 06:44:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/400983#M21951</guid>
      <dc:creator>FSUInnovation</dc:creator>
      <dc:date>2020-03-06T06:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: php curl and data input for standard api curls</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401158#M21959</link>
      <description>&lt;P&gt;There are a few different formats for&amp;nbsp;Dropbox API v2 endpoints, documented here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#formats" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#formats&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For example,&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata" target="_self"&gt;/2/files/get_metadata&lt;/A&gt; uses the "RPC" format, so it requires the parameters as JSON in the request body. Exactly how you set that will depend on your HTTPS client, but for curl in PHP I believe that's done via the 'CURLOPT_POSTFIELDS' option.&lt;/P&gt;
&lt;P&gt;For a different example, the&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_self"&gt;/2/files/download&lt;/A&gt; endpoint use the "content-download" format, so it expects the&amp;nbsp;parameters as JSON in the 'Dropbox-API-Arg' request header.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 19:06:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401158#M21959</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-03-06T19:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: php curl and data input for standard api curls</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401161#M21961</link>
      <description>&lt;P&gt;So as a general rule of thumb if I am not dealing with a Dropbox-API-Arg or similiar http header requirement the json encoded array or whatever data I would be providing should go to the post fields. I feel that's what you explained above but want to confirm it.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 19:22:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401161#M21961</guid>
      <dc:creator>FSUInnovation</dc:creator>
      <dc:date>2020-03-06T19:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: php curl and data input for standard api curls</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401176#M21964</link>
      <description>&lt;P&gt;Yes, when making an "RPC" style call, you don't use the "Dropbox-API-Arg" header, and your JSON should go in the request body, e.g., as set by 'CURLOPT_POSTFIELDS'.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 20:48:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/php-curl-and-data-input-for-standard-api-curls/m-p/401176#M21964</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-03-06T20:48:38Z</dc:date>
    </item>
  </channel>
</rss>

