| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.6"/> |
| <title>GRPC Core: src/core/httpcli/httpcli.h Source File</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| </script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">GRPC Core |
|  <span id="projectnumber">0.10.0.0</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.6 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="annotated.html"><span>Data Structures</span></a></li> |
| <li class="current"><a href="files.html"><span>Files</span></a></li> |
| <li> |
| <div id="MSearchBox" class="MSearchBoxInactive"> |
| <span class="left"> |
| <img id="MSearchSelect" src="search/mag_sel.png" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| alt=""/> |
| <input type="text" id="MSearchField" value="Search" accesskey="S" |
| onfocus="searchBox.OnSearchFieldFocus(true)" |
| onblur="searchBox.OnSearchFieldFocus(false)" |
| onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| </span><span class="right"> |
| <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| </span> |
| </div> |
| </li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="files.html"><span>File List</span></a></li> |
| <li><a href="globals.html"><span>Globals</span></a></li> |
| </ul> |
| </div> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.html">core</a></li><li class="navelem"><a class="el" href="dir_03e3f2561cf9e09e514d23ee8902839b.html">httpcli</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">httpcli.h</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <a href="httpcli_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> |
| <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright 2015, Google Inc.</span></div> |
| <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * All rights reserved.</span></div> |
| <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div> |
| <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * modification, are permitted provided that the following conditions are</span></div> |
| <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * met:</span></div> |
| <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * * Redistributions of source code must retain the above copyright</span></div> |
| <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div> |
| <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * * Redistributions in binary form must reproduce the above</span></div> |
| <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * copyright notice, this list of conditions and the following disclaimer</span></div> |
| <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * in the documentation and/or other materials provided with the</span></div> |
| <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * distribution.</span></div> |
| <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * * Neither the name of Google Inc. nor the names of its</span></div> |
| <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * contributors may be used to endorse or promote products derived from</span></div> |
| <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * this software without specific prior written permission.</span></div> |
| <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span></div> |
| <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span></div> |
| <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span></div> |
| <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span></div> |
| <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span></div> |
| <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span></div> |
| <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></div> |
| <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span></div> |
| <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div> |
| <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div> |
| <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div> |
| <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> */</span></div> |
| <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div> |
| <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#ifndef GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H</span></div> |
| <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor"></span><span class="preprocessor">#define GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H</span></div> |
| <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor"></span></div> |
| <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <stddef.h></span></div> |
| <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div> |
| <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <<a class="code" href="time_8h.html">grpc/support/time.h</a>></span></div> |
| <div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div> |
| <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#include "<a class="code" href="pollset__set_8h.html">src/core/iomgr/pollset_set.h</a>"</span></div> |
| <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> |
| <div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">/* User agent this library reports */</span></div> |
| <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="httpcli_8h.html#aad8b996f269fd3671a7c6fa829bdec95"> 44</a></span> <span class="preprocessor">#define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0"</span></div> |
| <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor"></span><span class="comment">/* Maximum length of a header string of the form 'Key: Value\r\n' */</span></div> |
| <div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="httpcli_8h.html#a20ed031787f50e2fbbf09a5f1ab4ccec"> 46</a></span> <span class="preprocessor">#define GRPC_HTTPCLI_MAX_HEADER_LENGTH 4096</span></div> |
| <div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor"></span></div> |
| <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment">/* A single header to be passed in a request */</span></div> |
| <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__header.html"> 49</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__httpcli__header.html">grpc_httpcli_header</a> {</div> |
| <div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__header.html#aa5504b4e9fba5978e4026dbeadb6619e"> 50</a></span>  <span class="keywordtype">char</span> *<a class="code" href="structgrpc__httpcli__header.html#aa5504b4e9fba5978e4026dbeadb6619e">key</a>;</div> |
| <div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__header.html#af1d05b8dfdd2f2f433efc955116cb2aa"> 51</a></span>  <span class="keywordtype">char</span> *<a class="code" href="structgrpc__httpcli__header.html#af1d05b8dfdd2f2f433efc955116cb2aa">value</a>;</div> |
| <div class="line"><a name="l00052"></a><span class="lineno"> 52</span> } <a class="code" href="httpcli_8h.html#a3b84c74398894ce993b1e32daf468575">grpc_httpcli_header</a>;</div> |
| <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div> |
| <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">/* Tracks in-progress http requests</span></div> |
| <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"> TODO(ctiller): allow caching and capturing multiple requests for the</span></div> |
| <div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"> same content and combining them */</span></div> |
| <div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__context.html"> 57</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__httpcli__context.html">grpc_httpcli_context</a> {</div> |
| <div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__context.html#aafa3ada73c3704d7e5d2971266e499f2"> 58</a></span>  <a class="code" href="structgrpc__pollset__set.html">grpc_pollset_set</a> <a class="code" href="structgrpc__httpcli__context.html#aafa3ada73c3704d7e5d2971266e499f2">pollset_set</a>;</div> |
| <div class="line"><a name="l00059"></a><span class="lineno"> 59</span> } <a class="code" href="httpcli_8h.html#aacb6a69953113d6b548366871b884345">grpc_httpcli_context</a>;</div> |
| <div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div> |
| <div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment">/* A request */</span></div> |
| <div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__request.html"> 62</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__httpcli__request.html">grpc_httpcli_request</a> {</div> |
| <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="comment">/* The host name to connect to */</span></div> |
| <div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__request.html#a907d00d1b3d1b8b0b8dddc0e7adbd48d"> 64</a></span>  <span class="keywordtype">char</span> *<a class="code" href="structgrpc__httpcli__request.html#a907d00d1b3d1b8b0b8dddc0e7adbd48d">host</a>;</div> |
| <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">/* The path of the resource to fetch */</span></div> |
| <div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__request.html#a5e51c4eefce49db4c5406e884ce8a4aa"> 66</a></span>  <span class="keywordtype">char</span> *<a class="code" href="structgrpc__httpcli__request.html#a5e51c4eefce49db4c5406e884ce8a4aa">path</a>;</div> |
| <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="comment">/* Additional headers: count and key/values; the following are supplied</span></div> |
| <div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"> automatically and MUST NOT be set here:</span></div> |
| <div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> Host, Connection, User-Agent */</span></div> |
| <div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__request.html#a3f21a167ba2c1a4afcb00023a707cde0"> 70</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__httpcli__request.html#a3f21a167ba2c1a4afcb00023a707cde0">hdr_count</a>;</div> |
| <div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__request.html#a00525596b5530699a64fa1baa90576c6"> 71</a></span>  <a class="code" href="structgrpc__httpcli__header.html">grpc_httpcli_header</a> *<a class="code" href="structgrpc__httpcli__request.html#a00525596b5530699a64fa1baa90576c6">hdrs</a>;</div> |
| <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="comment">/* whether to use ssl for the request */</span></div> |
| <div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__request.html#ab2502ce6e5c0362a8a0c0d02f571ceb3"> 73</a></span>  <span class="keywordtype">int</span> <a class="code" href="structgrpc__httpcli__request.html#ab2502ce6e5c0362a8a0c0d02f571ceb3">use_ssl</a>;</div> |
| <div class="line"><a name="l00074"></a><span class="lineno"> 74</span> } <a class="code" href="httpcli_8h.html#a4e0f0352ec7906d948f9dc046f9b4e79">grpc_httpcli_request</a>;</div> |
| <div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div> |
| <div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment">/* A response */</span></div> |
| <div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__response.html"> 77</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__httpcli__response.html">grpc_httpcli_response</a> {</div> |
| <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="comment">/* HTTP status code */</span></div> |
| <div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__response.html#ad43f89eff8a4ab84b0364eca501ad243"> 79</a></span>  <span class="keywordtype">int</span> <a class="code" href="structgrpc__httpcli__response.html#ad43f89eff8a4ab84b0364eca501ad243">status</a>;</div> |
| <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="comment">/* Headers: count and key/values */</span></div> |
| <div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__response.html#a5a190ad146f03dcf9c8db0031f3e592e"> 81</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__httpcli__response.html#a5a190ad146f03dcf9c8db0031f3e592e">hdr_count</a>;</div> |
| <div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__response.html#a8525db277ee594e9e806884aa3e4430d"> 82</a></span>  <a class="code" href="structgrpc__httpcli__header.html">grpc_httpcli_header</a> *<a class="code" href="structgrpc__httpcli__response.html#a8525db277ee594e9e806884aa3e4430d">hdrs</a>;</div> |
| <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="comment">/* Body: length and contents; contents are NOT null-terminated */</span></div> |
| <div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__response.html#a26967529714ef3cba3a5ce5f6a34d9cb"> 84</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__httpcli__response.html#a26967529714ef3cba3a5ce5f6a34d9cb">body_length</a>;</div> |
| <div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="structgrpc__httpcli__response.html#a8f37c239a412de970f3489c71ad08b90"> 85</a></span>  <span class="keywordtype">char</span> *<a class="code" href="structgrpc__httpcli__response.html#a8f37c239a412de970f3489c71ad08b90">body</a>;</div> |
| <div class="line"><a name="l00086"></a><span class="lineno"> 86</span> } <a class="code" href="httpcli_8h.html#a9b9787db48bc2c77f38575943dc8dad0">grpc_httpcli_response</a>;</div> |
| <div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div> |
| <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment">/* Callback for grpc_httpcli_get and grpc_httpcli_post. */</span></div> |
| <div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887"> 89</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887">grpc_httpcli_response_cb</a>)(<span class="keywordtype">void</span> *user_data,</div> |
| <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">const</span> <a class="code" href="structgrpc__httpcli__response.html">grpc_httpcli_response</a> *response);</div> |
| <div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div> |
| <div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">void</span> <a class="code" href="httpcli_8h.html#accc8da3837feac14f5f0b64e4cff8d1b">grpc_httpcli_context_init</a>(<a class="code" href="structgrpc__httpcli__context.html">grpc_httpcli_context</a> *context);</div> |
| <div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">void</span> <a class="code" href="httpcli_8h.html#a6d47084af44bf387790281f288f78d7b">grpc_httpcli_context_destroy</a>(<a class="code" href="structgrpc__httpcli__context.html">grpc_httpcli_context</a> *context);</div> |
| <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div> |
| <div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment">/* Asynchronously perform a HTTP GET.</span></div> |
| <div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> 'context' specifies the http context under which to do the get</span></div> |
| <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> 'pollset' indicates a grpc_pollset that is interested in the result</span></div> |
| <div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> of the get - work on this pollset may be used to progress the get</span></div> |
| <div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> operation</span></div> |
| <div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> 'request' contains request parameters - these are caller owned and can be</span></div> |
| <div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> destroyed once the call returns</span></div> |
| <div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> 'deadline' contains a deadline for the request (or gpr_inf_future)</span></div> |
| <div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> 'on_response' is a callback to report results to (and 'user_data' is a user</span></div> |
| <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> supplied pointer to pass to said call) */</span></div> |
| <div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="keywordtype">void</span> <a class="code" href="httpcli_8h.html#a594371d2c96d499a5a3bcccb27ece0da">grpc_httpcli_get</a>(<a class="code" href="structgrpc__httpcli__context.html">grpc_httpcli_context</a> *context, <a class="code" href="structgrpc__pollset.html">grpc_pollset</a> *pollset,</div> |
| <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keyword">const</span> <a class="code" href="structgrpc__httpcli__request.html">grpc_httpcli_request</a> *request,</div> |
| <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline,</div> |
| <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887">grpc_httpcli_response_cb</a> on_response, <span class="keywordtype">void</span> *user_data);</div> |
| <div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div> |
| <div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment">/* Asynchronously perform a HTTP POST.</span></div> |
| <div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> 'context' specifies the http context under which to do the post</span></div> |
| <div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> 'pollset' indicates a grpc_pollset that is interested in the result</span></div> |
| <div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> of the post - work on this pollset may be used to progress the post</span></div> |
| <div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> operation</span></div> |
| <div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> 'request' contains request parameters - these are caller owned and can be</span></div> |
| <div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> destroyed once the call returns</span></div> |
| <div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> 'body_bytes' and 'body_size' specify the payload for the post.</span></div> |
| <div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> When there is no body, pass in NULL as body_bytes.</span></div> |
| <div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> 'deadline' contains a deadline for the request (or gpr_inf_future)</span></div> |
| <div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> 'em' points to a caller owned event manager that must be alive for the</span></div> |
| <div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> lifetime of the request</span></div> |
| <div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"> 'on_response' is a callback to report results to (and 'user_data' is a user</span></div> |
| <div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> supplied pointer to pass to said call)</span></div> |
| <div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"> Does not support ?var1=val1&var2=val2 in the path. */</span></div> |
| <div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">void</span> <a class="code" href="httpcli_8h.html#a96f034743193848e966d61192e406c70">grpc_httpcli_post</a>(<a class="code" href="structgrpc__httpcli__context.html">grpc_httpcli_context</a> *context, <a class="code" href="structgrpc__pollset.html">grpc_pollset</a> *pollset,</div> |
| <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keyword">const</span> <a class="code" href="structgrpc__httpcli__request.html">grpc_httpcli_request</a> *request,</div> |
| <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *body_bytes, <span class="keywordtype">size_t</span> body_size,</div> |
| <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline,</div> |
| <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887">grpc_httpcli_response_cb</a> on_response, <span class="keywordtype">void</span> *user_data);</div> |
| <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> |
| <div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment">/* override functions return 1 if they handled the request, 0 otherwise */</span></div> |
| <div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="httpcli_8h.html#a789e91e8c276aedb1c32873c3d6fa217"> 132</a></span> <span class="keyword">typedef</span> int (*<a class="code" href="httpcli_8h.html#a789e91e8c276aedb1c32873c3d6fa217">grpc_httpcli_get_override</a>)(<span class="keyword">const</span> <a class="code" href="structgrpc__httpcli__request.html">grpc_httpcli_request</a> *request,</div> |
| <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline,</div> |
| <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <a class="code" href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887">grpc_httpcli_response_cb</a> on_response,</div> |
| <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordtype">void</span> *user_data);</div> |
| <div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="httpcli_8h.html#a0591ce896f1a3f9b1b86e4eb6e9ac225"> 136</a></span> <span class="keyword">typedef</span> int (*<a class="code" href="httpcli_8h.html#a0591ce896f1a3f9b1b86e4eb6e9ac225">grpc_httpcli_post_override</a>)(<span class="keyword">const</span> <a class="code" href="structgrpc__httpcli__request.html">grpc_httpcli_request</a> *request,</div> |
| <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *body_bytes,</div> |
| <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordtype">size_t</span> body_size,</div> |
| <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline,</div> |
| <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887">grpc_httpcli_response_cb</a> on_response,</div> |
| <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordtype">void</span> *user_data);</div> |
| <div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div> |
| <div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="keywordtype">void</span> <a class="code" href="httpcli_8h.html#a15ab7c87e0d5e42341c9652d5045d8ce">grpc_httpcli_set_override</a>(<a class="code" href="httpcli_8h.html#a789e91e8c276aedb1c32873c3d6fa217">grpc_httpcli_get_override</a> <span class="keyword">get</span>,</div> |
| <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="httpcli_8h.html#a0591ce896f1a3f9b1b86e4eb6e9ac225">grpc_httpcli_post_override</a> post);</div> |
| <div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div> |
| <div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor">#endif </span><span class="comment">/* GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H */</span><span class="preprocessor"></span></div> |
| <div class="ttc" id="structgrpc__httpcli__header_html_af1d05b8dfdd2f2f433efc955116cb2aa"><div class="ttname"><a href="structgrpc__httpcli__header.html#af1d05b8dfdd2f2f433efc955116cb2aa">grpc_httpcli_header::value</a></div><div class="ttdeci">char * value</div><div class="ttdef"><b>Definition:</b> httpcli.h:51</div></div> |
| <div class="ttc" id="httpcli_8h_html_a594371d2c96d499a5a3bcccb27ece0da"><div class="ttname"><a href="httpcli_8h.html#a594371d2c96d499a5a3bcccb27ece0da">grpc_httpcli_get</a></div><div class="ttdeci">void grpc_httpcli_get(grpc_httpcli_context *context, grpc_pollset *pollset, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data)</div><div class="ttdef"><b>Definition:</b> httpcli.c:231</div></div> |
| <div class="ttc" id="structgrpc__httpcli__response_html_a8525db277ee594e9e806884aa3e4430d"><div class="ttname"><a href="structgrpc__httpcli__response.html#a8525db277ee594e9e806884aa3e4430d">grpc_httpcli_response::hdrs</a></div><div class="ttdeci">grpc_httpcli_header * hdrs</div><div class="ttdef"><b>Definition:</b> httpcli.h:82</div></div> |
| <div class="ttc" id="time_8h_html"><div class="ttname"><a href="time_8h.html">time.h</a></div></div> |
| <div class="ttc" id="structgrpc__httpcli__request_html_a907d00d1b3d1b8b0b8dddc0e7adbd48d"><div class="ttname"><a href="structgrpc__httpcli__request.html#a907d00d1b3d1b8b0b8dddc0e7adbd48d">grpc_httpcli_request::host</a></div><div class="ttdeci">char * host</div><div class="ttdef"><b>Definition:</b> httpcli.h:64</div></div> |
| <div class="ttc" id="httpcli_8h_html_a3b84c74398894ce993b1e32daf468575"><div class="ttname"><a href="httpcli_8h.html#a3b84c74398894ce993b1e32daf468575">grpc_httpcli_header</a></div><div class="ttdeci">struct grpc_httpcli_header grpc_httpcli_header</div></div> |
| <div class="ttc" id="httpcli_8h_html_a4e0f0352ec7906d948f9dc046f9b4e79"><div class="ttname"><a href="httpcli_8h.html#a4e0f0352ec7906d948f9dc046f9b4e79">grpc_httpcli_request</a></div><div class="ttdeci">struct grpc_httpcli_request grpc_httpcli_request</div></div> |
| <div class="ttc" id="httpcli_8h_html_accc8da3837feac14f5f0b64e4cff8d1b"><div class="ttname"><a href="httpcli_8h.html#accc8da3837feac14f5f0b64e4cff8d1b">grpc_httpcli_context_init</a></div><div class="ttdeci">void grpc_httpcli_context_init(grpc_httpcli_context *context)</div><div class="ttdef"><b>Definition:</b> httpcli.c:71</div></div> |
| <div class="ttc" id="httpcli_8h_html_a6d47084af44bf387790281f288f78d7b"><div class="ttname"><a href="httpcli_8h.html#a6d47084af44bf387790281f288f78d7b">grpc_httpcli_context_destroy</a></div><div class="ttdeci">void grpc_httpcli_context_destroy(grpc_httpcli_context *context)</div><div class="ttdef"><b>Definition:</b> httpcli.c:75</div></div> |
| <div class="ttc" id="structgrpc__httpcli__context_html_aafa3ada73c3704d7e5d2971266e499f2"><div class="ttname"><a href="structgrpc__httpcli__context.html#aafa3ada73c3704d7e5d2971266e499f2">grpc_httpcli_context::pollset_set</a></div><div class="ttdeci">grpc_pollset_set pollset_set</div><div class="ttdef"><b>Definition:</b> httpcli.h:58</div></div> |
| <div class="ttc" id="structgrpc__pollset_html"><div class="ttname"><a href="structgrpc__pollset.html">grpc_pollset</a></div><div class="ttdef"><b>Definition:</b> pollset_posix.h:48</div></div> |
| <div class="ttc" id="httpcli_8h_html_a0591ce896f1a3f9b1b86e4eb6e9ac225"><div class="ttname"><a href="httpcli_8h.html#a0591ce896f1a3f9b1b86e4eb6e9ac225">grpc_httpcli_post_override</a></div><div class="ttdeci">int(* grpc_httpcli_post_override)(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data)</div><div class="ttdef"><b>Definition:</b> httpcli.h:136</div></div> |
| <div class="ttc" id="structgrpc__httpcli__response_html_a8f37c239a412de970f3489c71ad08b90"><div class="ttname"><a href="structgrpc__httpcli__response.html#a8f37c239a412de970f3489c71ad08b90">grpc_httpcli_response::body</a></div><div class="ttdeci">char * body</div><div class="ttdef"><b>Definition:</b> httpcli.h:85</div></div> |
| <div class="ttc" id="structgrpc__httpcli__response_html_ad43f89eff8a4ab84b0364eca501ad243"><div class="ttname"><a href="structgrpc__httpcli__response.html#ad43f89eff8a4ab84b0364eca501ad243">grpc_httpcli_response::status</a></div><div class="ttdeci">int status</div><div class="ttdef"><b>Definition:</b> httpcli.h:79</div></div> |
| <div class="ttc" id="httpcli_8h_html_a9b9787db48bc2c77f38575943dc8dad0"><div class="ttname"><a href="httpcli_8h.html#a9b9787db48bc2c77f38575943dc8dad0">grpc_httpcli_response</a></div><div class="ttdeci">struct grpc_httpcli_response grpc_httpcli_response</div></div> |
| <div class="ttc" id="structgrpc__httpcli__request_html_a00525596b5530699a64fa1baa90576c6"><div class="ttname"><a href="structgrpc__httpcli__request.html#a00525596b5530699a64fa1baa90576c6">grpc_httpcli_request::hdrs</a></div><div class="ttdeci">grpc_httpcli_header * hdrs</div><div class="ttdef"><b>Definition:</b> httpcli.h:71</div></div> |
| <div class="ttc" id="httpcli_8h_html_a789e91e8c276aedb1c32873c3d6fa217"><div class="ttname"><a href="httpcli_8h.html#a789e91e8c276aedb1c32873c3d6fa217">grpc_httpcli_get_override</a></div><div class="ttdeci">int(* grpc_httpcli_get_override)(const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data)</div><div class="ttdef"><b>Definition:</b> httpcli.h:132</div></div> |
| <div class="ttc" id="structgrpc__httpcli__response_html_a5a190ad146f03dcf9c8db0031f3e592e"><div class="ttname"><a href="structgrpc__httpcli__response.html#a5a190ad146f03dcf9c8db0031f3e592e">grpc_httpcli_response::hdr_count</a></div><div class="ttdeci">size_t hdr_count</div><div class="ttdef"><b>Definition:</b> httpcli.h:81</div></div> |
| <div class="ttc" id="httpcli_8h_html_aacb6a69953113d6b548366871b884345"><div class="ttname"><a href="httpcli_8h.html#aacb6a69953113d6b548366871b884345">grpc_httpcli_context</a></div><div class="ttdeci">struct grpc_httpcli_context grpc_httpcli_context</div></div> |
| <div class="ttc" id="structgrpc__httpcli__request_html"><div class="ttname"><a href="structgrpc__httpcli__request.html">grpc_httpcli_request</a></div><div class="ttdef"><b>Definition:</b> httpcli.h:62</div></div> |
| <div class="ttc" id="structgrpc__httpcli__request_html_a5e51c4eefce49db4c5406e884ce8a4aa"><div class="ttname"><a href="structgrpc__httpcli__request.html#a5e51c4eefce49db4c5406e884ce8a4aa">grpc_httpcli_request::path</a></div><div class="ttdeci">char * path</div><div class="ttdef"><b>Definition:</b> httpcli.h:66</div></div> |
| <div class="ttc" id="pollset__set_8h_html"><div class="ttname"><a href="pollset__set_8h.html">pollset_set.h</a></div></div> |
| <div class="ttc" id="structgrpc__httpcli__response_html_a26967529714ef3cba3a5ce5f6a34d9cb"><div class="ttname"><a href="structgrpc__httpcli__response.html#a26967529714ef3cba3a5ce5f6a34d9cb">grpc_httpcli_response::body_length</a></div><div class="ttdeci">size_t body_length</div><div class="ttdef"><b>Definition:</b> httpcli.h:84</div></div> |
| <div class="ttc" id="structgrpc__httpcli__header_html_aa5504b4e9fba5978e4026dbeadb6619e"><div class="ttname"><a href="structgrpc__httpcli__header.html#aa5504b4e9fba5978e4026dbeadb6619e">grpc_httpcli_header::key</a></div><div class="ttdeci">char * key</div><div class="ttdef"><b>Definition:</b> httpcli.h:50</div></div> |
| <div class="ttc" id="structgpr__timespec_html"><div class="ttname"><a href="structgpr__timespec.html">gpr_timespec</a></div><div class="ttdef"><b>Definition:</b> time.h:60</div></div> |
| <div class="ttc" id="httpcli_8h_html_a00129a2e0bb8e9d9a6632e88f7a8c887"><div class="ttname"><a href="httpcli_8h.html#a00129a2e0bb8e9d9a6632e88f7a8c887">grpc_httpcli_response_cb</a></div><div class="ttdeci">void(* grpc_httpcli_response_cb)(void *user_data, const grpc_httpcli_response *response)</div><div class="ttdef"><b>Definition:</b> httpcli.h:89</div></div> |
| <div class="ttc" id="structgrpc__httpcli__request_html_a3f21a167ba2c1a4afcb00023a707cde0"><div class="ttname"><a href="structgrpc__httpcli__request.html#a3f21a167ba2c1a4afcb00023a707cde0">grpc_httpcli_request::hdr_count</a></div><div class="ttdeci">size_t hdr_count</div><div class="ttdef"><b>Definition:</b> httpcli.h:70</div></div> |
| <div class="ttc" id="structgrpc__pollset__set_html"><div class="ttname"><a href="structgrpc__pollset__set.html">grpc_pollset_set</a></div><div class="ttdef"><b>Definition:</b> pollset_set_posix.h:40</div></div> |
| <div class="ttc" id="structgrpc__httpcli__context_html"><div class="ttname"><a href="structgrpc__httpcli__context.html">grpc_httpcli_context</a></div><div class="ttdef"><b>Definition:</b> httpcli.h:57</div></div> |
| <div class="ttc" id="httpcli_8h_html_a96f034743193848e966d61192e406c70"><div class="ttname"><a href="httpcli_8h.html#a96f034743193848e966d61192e406c70">grpc_httpcli_post</a></div><div class="ttdeci">void grpc_httpcli_post(grpc_httpcli_context *context, grpc_pollset *pollset, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data)</div><div class="ttdef"><b>Definition:</b> httpcli.c:263</div></div> |
| <div class="ttc" id="structgrpc__httpcli__response_html"><div class="ttname"><a href="structgrpc__httpcli__response.html">grpc_httpcli_response</a></div><div class="ttdef"><b>Definition:</b> httpcli.h:77</div></div> |
| <div class="ttc" id="structgrpc__httpcli__request_html_ab2502ce6e5c0362a8a0c0d02f571ceb3"><div class="ttname"><a href="structgrpc__httpcli__request.html#ab2502ce6e5c0362a8a0c0d02f571ceb3">grpc_httpcli_request::use_ssl</a></div><div class="ttdeci">int use_ssl</div><div class="ttdef"><b>Definition:</b> httpcli.h:73</div></div> |
| <div class="ttc" id="httpcli_8h_html_a15ab7c87e0d5e42341c9652d5045d8ce"><div class="ttname"><a href="httpcli_8h.html#a15ab7c87e0d5e42341c9652d5045d8ce">grpc_httpcli_set_override</a></div><div class="ttdeci">void grpc_httpcli_set_override(grpc_httpcli_get_override get, grpc_httpcli_post_override post)</div><div class="ttdef"><b>Definition:</b> httpcli.c:297</div></div> |
| <div class="ttc" id="structgrpc__httpcli__header_html"><div class="ttname"><a href="structgrpc__httpcli__header.html">grpc_httpcli_header</a></div><div class="ttdef"><b>Definition:</b> httpcli.h:49</div></div> |
| </div><!-- fragment --></div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated on Wed Aug 5 2015 08:17:07 for GRPC Core by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.6 |
| </small></address> |
| </body> |
| </html> |