This question is about HttpUtils2: HttpUtils2 - Web services are now even simpler
In some cases we need to modify the request. For example we may need to add a header to the message before it is sent.
Note that it is not possible to call Job.GetRequest before Job.Download as the request is initialized in Job.Download.
Does it work?
Why?
In some cases we need to modify the request. For example we may need to add a header to the message before it is sent.
B4X:
Dim Job As HttpJob
Job.Initialize("Job", Me)
Job.Download("http://www.b4x.com")
' ****** The header is set after Download is called ?!
Job.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)")
Note that it is not possible to call Job.GetRequest before Job.Download as the request is initialized in Job.Download.
Does it work?
Why?