title: How to create Virtual Network in Azure using GoLang API?
body: <p>Currently I am trying to create Virtual Network using the GoLang code:</p>
  
  <pre><code>client := network.NewVirtualNetworksClient(subscriptionID)
  var parameters network.VirtualNetwork
  c := make(&lt;-chan struct{})
  
  c1, err := client.CreateOrUpdate(resourceGroupName, virtualNetworkName, parameters, c)
  
  utils.Info.Println(err.Error())
  utils.Info.Println(c1)
  </code></pre>
  
  <p>But the code isn't working fine. It throws the following exception:</p>
  
  <p>Failure sending request: StatusCode=401 -- Original Error: Long running operation terminated with status 'Failed': Code="AuthenticationFailed" Message="Authentication failed. The 'Authorization' header is missing."</p>
  
  <p>Your help will be highly appreciated.</p>