Does the include parameter allow multiple values?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2018
03:25 PM
Using WordPress and built-in wp_remote_get function:
$get_webinars = wp_remote_get('https://myurl.instructure.com/api/v1/accounts/6/courses?per_page=100&include[]=syllabus_body', array(
'headers' => array(
'Authorization' => 'Bearer ' . $token
)
));
The above code returns the syllabus_body as an optional include. When I try to add public_description as well:
$get_webinars = wp_remote_get('https://myurl.instructure.com/api/v1/accounts/6/courses?per_page=100&include[]=syllabus_body,public_description', array(
'headers' => array(
'Authorization' => 'Bearer ' . $token
)
));
I don't get the syllabus_body or public_description.
Doesn't the include[] parameter mean it can support an array of values?
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2018
04:19 PM
You probably need to repeat the include[]:
&include[]=syllabus_body&include[]=public_description