|
|
- <div class="highlight"><pre><span></span><span class="c1"># Passing diagnostic information in the POST body:</span>
- <span class="kn">import</span> <span class="nn">requests</span>
- <span class="n">requests</span><span class="o">.</span><span class="n">post</span><span class="p">(</span><span class="s2">"{{ ping_url }}"</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="s2">"temperature=-7"</span><span class="p">)</span>
-
- <span class="c1"># Passing diagnostic information in the User-Agent header:</span>
- <span class="kn">import</span> <span class="nn">requests</span>
- <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"{{ ping_url }}"</span><span class="p">,</span> <span class="n">headers</span><span class="o">=</span><span class="p">{</span><span class="s2">"User-Agent"</span><span class="p">:</span> <span class="s2">"temperature=-7"</span><span class="p">})</span>
- </pre></div>
|