ilmix
ilmix

Reputation: 151

How to add custom soup message headers in gjs?

I can't find any method in Soup.Message that would allow me to add custom headers. I tried adding headers using Message.requset_headers but that field is read only. How can I add custom header to my message?

Upvotes: 0

Views: 210

Answers (1)

ptomato
ptomato

Reputation: 57920

Message.request_headers is read-only, but its value is a Soup.MessageHeaders instance, which has an append() method you can use to add a custom header.

Upvotes: 1

Related Questions