I'm trying to implement Firebase Cloud Messaging server in Java. How do I achieve adding headers such as Content-Type, Authorization:key as well as JSON data to the Firebase Cloud Messaging URL?
What I'm trying to achieve is from this URL and shown in the image below:

            Asked
            
        
        
            Active
            
        
            Viewed 30 times
        
    0
            
            
         
    
    
        Frank van Puffelen
        
- 565,676
- 79
- 828
- 807
 
    
    
        Manny265
        
- 1,709
- 4
- 23
- 42
- 
                    4See http://stackoverflow.com/questions/39159704/java-server-send-push-with-post-to-google-firebase-cloud – Frank van Puffelen Oct 01 '16 at 16:14
- 
                    made a mistake. the two items in my combo were the same n maybe thats why it returned index 0. when I changed the second item value things were ok @HovercraftFullOfEels – Manny265 Oct 02 '16 at 01:26
- 
                    1Thanks for the update. In the future, please don't leave us in the lurch like this. Try to remember, that we're volunteers. If I put some thought, time and effort into trying to help figure something out, the least I deserve is closure or resolution on what caused the problem. – Hovercraft Full Of Eels Oct 02 '16 at 01:29