Advertisement
Guest User

Untitled

a guest
Apr 4th, 2022
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.40 KB | None | 0 0
  1.     var testData = []byte(`{"file_id": 1234}`)
  2.  
  3.  
  4.     downloadReq, err := http.NewRequest("POST", "https://api.opensubtitles.com/api/v1/download", bytes.NewBuffer(testData))
  5.    
  6.    
  7.     downloadReq.Header.Add("Api-Key", "WITHHELD_FOR_POST")
  8.     downloadReq.Header.Add("Content-Type", "application/json")
  9.     downloadReq.Header.Add("User-Agent", "leshmoa/1.0")
  10.  
  11.     downloadResp, err := http.DefaultClient.Do(downloadReq)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement