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
So some extra procedures for handling different media types would be great.
pointer il_getAcceptedMediaTypes(request); The returned pointer could be a simple list instance which is already in the project. We would just need to expose the list API by adding them to the binder source of the ILEastic service program.
varchar il_getPreferredAcceptedMediaType(request); This would return the accept http header with the highest priority. Could return / if none was provided.
varchar il_isMediaTypeAccepted(request : 'application/json' : ... : 'application/xml'); This would return the media type which ranks the highest in the list of accepted media types. As RPG cannot do variable number of parameter we would need to limit them to a fixed number and declare them as *nopass.
The text was updated successfully, but these errors were encountered:
Currently you can just retrieve the value of the Accept header. But the header can have multiple values like
or even with a priority
So some extra procedures for handling different media types would be great.
pointer il_getAcceptedMediaTypes(request);
The returned pointer could be a simple list instance which is already in the project. We would just need to expose the list API by adding them to the binder source of the ILEastic service program.varchar il_getPreferredAcceptedMediaType(request);
This would return the accept http header with the highest priority. Could return / if none was provided.varchar il_isMediaTypeAccepted(request : 'application/json' : ... : 'application/xml');
This would return the media type which ranks the highest in the list of accepted media types. As RPG cannot do variable number of parameter we would need to limit them to a fixed number and declare them as *nopass.The text was updated successfully, but these errors were encountered: