You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When AS3 fetches remote URL resources, customers need a way to specify custom HTTP request headers on the GET request.
Describe the solution you'd like:
When specifying any external URL reference, add schema so that custom HTTP request header name and values can be specified.
For example, in order for AS3 to fetch resources from githubs REST API endpoint api.github.com, the request header "Accept: application/vnd.github.raw+json" must be specified.
n-number HTTP request header name/values using an item array
specified per URL reference if some URLs need special headers and others don't
Currently, there is no easy way to add this to the GET request when AS3 fetches the resource. I found that I could modify /var/config/rest/iapps/f5-appsvcs/lib/util/util.js file on Big-IP to hard-code extra request headers, but this is global, messy, and unsupported.
((Fun fact)) the modification is adding these 3 lines and restarting restnoded:
if (typeof opts.headers['Accept'] !== 'string') {
opts.headers['Accept'] = 'application/vnd.github.raw+json';
}
After that, i am able to fetch files from github REST API.
The text was updated successfully, but these errors were encountered:
When AS3 fetches remote URL resources, customers need a way to specify custom HTTP request headers on the GET request.
Describe the solution you'd like:
When specifying any external URL reference, add schema so that custom HTTP request header name and values can be specified.
For example, in order for AS3 to fetch resources from githubs REST API endpoint api.github.com, the request header
"Accept: application/vnd.github.raw+json"
must be specified.Example AS3 Schema:
Ideally:
Currently, there is no easy way to add this to the GET request when AS3 fetches the resource. I found that I could modify
/var/config/rest/iapps/f5-appsvcs/lib/util/util.js
file on Big-IP to hard-code extra request headers, but this is global, messy, and unsupported.((Fun fact)) the modification is adding these 3 lines and restarting restnoded:
After that, i am able to fetch files from github REST API.
The text was updated successfully, but these errors were encountered: