IBM MobileFirst: inspecting the HTTP adapter to ba

2019-08-26 06:03发布

I am reaching a back-end from an HTTP adapter deployed in the MobileFirst Development Server with some unexpected results in the responses.

The back-end is outside of my control and uses HTTPS, so inspecting the back-end logs or the traffic with wireshark is not a option for me.

I'd like to be able to inspect the outgoing headers. Is there some way to do this?

1条回答
趁早两清
2楼-- · 2019-08-26 06:51

Worklight Server to Backend
I think that easiest would be to switch to HTTP for the time of inspection (assuming it's not production-time), or to add a certificate to Wireshark in order to be able to inspect the network traffic even though it's in HTTPS

Device to Worklight Server Assuming your request is not being sent via HTTPS as well, I believe you can see all sent headers in the Network tab inside Chrome's DevTools.

Depending on your Worklight version you may not see any of the queries being done.
In that case you could add the following in initOptions.js at the very bottom, and try again (but do note that this is unsupported and could change with any release w/out prior mentioning - use it only for the sake of this debugging session to see the queries in the Network tab log).

WL.androidProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
WL.iphoneProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
WL.ipadProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
WL.windowsphone8ProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;

But if you're using HTTPS in all endpoints it might not help... consider changing to HTTP while developing the app?

查看更多
登录 后发表回答