Do IBM Worklight HTTP Adapters (in 6.1) send a User-Agent header by default when invoking a back-end service using WL.Server.invokeHttp
? What is it's value? Assuming the answer is no, can we add one?
相关问题
- PHP Empty $_POST
- Extract Location from Response Header with JMeter
- Set Custom Header in Nginx config and pass it to g
- When I force downloading a file from a page, it sp
- Access-Control-Allow-Origin headers not working
相关文章
- Is there a size limit for HTTP response headers on
- Is a unicode user agent legal inside an HTTP heade
- is there a “rails” way to redirect if mobile brows
- What is the definition of HTTP_X_PURPOSE?
- how to parse user agent string? python
- Why does Google Chrome NOT use cached pages when I
- What to do with extra HTTP header from proxy?
- Can I set an Access-Control-Allow-Origin header to
When you invoke an adapter procedure, you can inspect the network using a tool such as Wireshark. There you will see that a User-Agent header is sent. This header is automatically added by the underlying Apache HTTPClient.
That said, you can add your own headers. Per the user documentation for
WL.Server.invokeHttp
:For example:
As for its value, it may not have any value for you. It is just part of the standard.
See here for more (or google for additional information): HTTP request header: UserAgent variable
In the adapter you can get the user agent the client sent like this:
If you then want to pass this header along to a backend service: