weblayer: adds API for setting network request headers
Here's the doc for the new function, which is added to Navigation: Sets a header for a network request. If a header with the specified name exists it is overwritten. This method can only be called at two times, from {@link NavigationCallback.onNavigationStarted} and {@link NavigationCallback.onNavigationStarted}. When called during start, the header applies to both the initial network request as well as redirects. @param name The name of the header. The name must be rfc 2616 compliant. @param value The value of the header. The value must not contain '\0', '\n' or '\r'. @throws IllegalArgumentException If supplied invalid values. @throws IllegalStateException If not called during start or a redirect. @since 83 public void setRequestHeader(@NonNull String name, @NonNull String value) { BUG=1065536 TEST=covered by tests Change-Id: Ibe6487bcc7167fd2e68fcaee46915a877f4619b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133171Reviewed-by:John Abd-El-Malek <jam@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#758190}
Showing
Please register or sign in to comment