Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.80 KB | None | 0 0
  1.   // urgh, why is this connection not being called                                                        
  2.                                                                                                          
  3.   resp, err := http.PostForm("http://127.0.0.1:3004/provision", url.Values{"space": {details.ProvisionedSpace}})                                                                                                  
  4.   if err != nil {                                                                                      
  5.     log.Printf("error here: %s", err)                                                                  
  6.   }                                                                                                    
  7.                                                                                                          
  8.   // lets try if we do this a different way (via http Request)                                            
  9.   // still doesn't work. hmm                                                                              
  10.   client := &http.Client{}                                                                                
  11.   req, err := http.NewRequest("POST", "http://localhost:3004/provision", nil)                            
  12.   if err != nil {                                                                                        
  13.     log.Printf("error making request %s", err)                                                            
  14.   }                                                                                                      
  15.                                                                                                          
  16.   resp, err := client.Do(req)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement