Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Contributor
Posts: 13
Registered: ‎04-14-2011
My Device: playbook,SmartPhones
My Carrier: Flex,Blackberry JDE
Accepted Solution

Problem in setting up api key in httpHeader in blackberry

I am doing simple application for a client..I am using jde 7.0 . I have to get the data from the url. The url needs the api key and key name and they should be present in the header of the httpConnection. I dont know how to specify the keyname and api key in the header.

 

Can anyone help? Can anyone provide me the code? 

Contributor
Posts: 13
Registered: ‎04-14-2011
My Device: playbook,SmartPhones
My Carrier: Flex,Blackberry JDE

Re: Problem in setting up api key in httpHeader in blackberry

I solved the problem..... 

The following is the syntax

 

con.setRequestProperty("api key name" ,"api key value");

 

for example

 

connection.setRequestProperty("X-API-KEY", apiKey);

 Thank you and Regards

Vikram(Blackberry developer)