Be a good citizen and set the header in the reply
This commit is contained in:
		
							parent
							
								
									a26bd9ab4d
								
							
						
					
					
						commit
						8a17fcf59f
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -27,5 +27,10 @@ func HandleStatus(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		Ready: true,
 | 
							Ready: true,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Be a good citizen and set the header for the return
 | 
				
			||||||
 | 
						w.Header().Set("Content-Type", "application/json; charset=UTF-8")
 | 
				
			||||||
 | 
						w.WriteHeader(http.StatusOK)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Reply with the current status
 | 
				
			||||||
	json.NewEncoder(w).Encode(status)
 | 
						json.NewEncoder(w).Encode(status)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue