Aug-16-2017, 05:55 PM
(Aug-16-2017, 05:07 PM)prsdll6 Wrote: 'https://api.example.com/rest/addns/ + line'So for every line in the file, regardless of what's in that line, you make a request to literally "https://api.example.com/rest/addns/ + line". Python doesn't do magic string interpolation (thankfully), you need to identify things that are variables inside strings.
Instead, try this:
http.request("https://api.example.com/rest/addns/{0}".format(line), json.encode #etc)