Start a new topic

Get os version from request (x-kinvey-device-information)


I'm trying to fetch the value of the x-kinvey-device-information header (example: "x-kinvey-device-information":"iPhone Simulator/x86_64 iPhone OS 8.0"), I can't find any way to pull it from the Request object.



public CommandResponse handleBLRequest(@PathParam(KINVEY_COMMAND) String command, Request request){"command: " + request.getCommand());"http action: " + request.getHttpAction());"kinvey action: " + request.getKinveyAction());"args: " + request.getArguments());"platform: " + request.getArguments().getKinveyAppMetadata().getPlatform());"id: " + request.getArguments().getKinveyAppMetadata().getId());"name: " + request.getArguments().getKinveyAppMetadata().getName());"api version: " + request.getArguments().getKinveyAppMetadata().getApiVersion());


results in


command: customEndpoint

http action: POST

kinvey action: Save

args: com.kinvey.business_logic.CollectionArguments@1dd6ab4

platform: null



api version: null


I assumed this would come through in getPlatform(), but is there another way to access it? Thanks in advance.
1 Comment


are you making this request through, the REST api, or through one of the Client libraries?

Try printing out the values in this hashmap, which will you show all the headers on the request:

HashMap headers = request.getArguments().getKinveyRequest().getHeaders()

Also, just so you know our (BETA) Business Logic SDK is open source, so feel free to take a look:
Login or Signup to post a comment