How to add headers for CreateSession in robot framework HTTP requests library

后端 未结 2 739
温柔的废话
温柔的废话 2021-01-06 13:45

I am using the requests library in Robot framework provided at this github link. The documentation implies that if can send custom headers by doing CreateSession <

2条回答
  •  死守一世寂寞
    2021-01-06 14:10

    According to the Requests documentation, you may add headers to the Session object as:

    s = requests.Session()
    s.auth = ('user', 'pass')
    s.headers.update({'x-test': 'true'})
    

提交回复
热议问题