View Single Post
Old 05-17-2024, 06:52 PM   #1
dandman
Enthusiast
dandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watchdandman is clearly one to watch
 
Posts: 29
Karma: 10545
Join Date: May 2024
Device: none
self.browser.open_novisit() POST with custom header ?

since as a plugin developer i have to use the library versions that Caliber include,

how do i call a post with a custom header ?
i tried:

PHP Code:
self.browser.set_current_header(('Content-Type''application/json; charset=utf-8'))
response self.browser.open_novisit('https://www......'data=json.dumps(json_object), timeout=5
and:

PHP Code:
self.browser.addheaders += [('Content-Type''application/json; charset=utf-8')]
response self.browser.open_novisit('https://www......'data=json.dumps(json_object), timeout=5
and:

PHP Code:
self.browser.addheaders = [('Content-Type''application/json; charset=utf-8')]
response self.browser.open_novisit('https://www......'data=json.dumps(json_object), timeout=5

anyone knows ?
dandman is offline   Reply With Quote