Using WordPress and built-in wp_remote_get function:
<SPAN class="variable token">$get_webinars</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="token function">wp_remote_get</SPAN><SPAN class="punctuation token">(</SPAN>'https<SPAN class="punctuation token">:</SPAN><SPAN class="comment token">//myurl.instructure.com/api/v1/accounts/6/courses?per_page=100&include[]=syllabus_body', array(</SPAN><BR /> <SPAN class="string token">'headers'</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="keyword token">array</SPAN><SPAN class="punctuation token">(</SPAN><BR /> <SPAN class="string token">'Authorization'</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="string token">'Bearer '</SPAN> <SPAN class="punctuation token">.</SPAN> <SPAN class="variable token">$token</SPAN><BR /> <SPAN class="punctuation token">)</SPAN><BR /> <SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The above code returns the syllabus_body as an optional include. When I try to add public_description as well:
<SPAN class="variable token">$get_webinars</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="token function">wp_remote_get</SPAN><SPAN class="punctuation token">(</SPAN>'https<SPAN class="punctuation token">:</SPAN><SPAN class="comment token">//myurl.instructure.com/api/v1/accounts/6/courses?per_page=100&include[]=syllabus_body,public_description', array(</SPAN><BR /> <SPAN class="string token">'headers'</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="keyword token">array</SPAN><SPAN class="punctuation token">(</SPAN><BR /> <SPAN class="string token">'Authorization'</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="string token">'Bearer '</SPAN> <SPAN class="punctuation token">.</SPAN> <SPAN class="variable token">$token</SPAN><BR /> <SPAN class="punctuation token">)</SPAN><BR /> <SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I don't get the syllabus_body or public_description.
Doesn't the include[] parameter mean it can support an array of values?