I'm trying to send pushbullet notifications with linefeed / newlines but it doesnt work. when i add %0d or \n it doesnt do anything.
in bash i just add -d to my curl command and it works. is there a similar solution for pycurl ?
Thanks in advance
any suggestions ?
import pycurl
text2 = "line%0dline2"
postData = '{"type":"note", "title":"Title", "body":"%s"}' %text2.encode("utf-8")
c = pycurl.Curl()
c.setopt(pycurl.WRITEFUNCTION, lambda x: None)
c.setopt(pycurl.URL, 'https://api.pushbullet.com/v2/pushes')
c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json'])
c.setopt(pycurl.USERPWD, "api")
c.setopt(pycurl.POST, 1)
c.setopt(pycurl.POSTFIELDS, postData)
c.perform()