Java Code Examples for oauth.signpost.http.HttpRequest#setHeader()
The following examples show how to use
oauth.signpost.http.HttpRequest#setHeader() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OAuthTest.java From burp-oauth with MIT License | 5 votes |
@Test public void testInsertHeader() throws IOException { HttpRequest hr = reqWrapForTestInput(1); assertEquals(hr.getHeader(INSERT_HEADER_NAME), null); hr.setHeader(INSERT_HEADER_NAME, INSERT_HEADER_VALUE); assertEquals(hr.getHeader(INSERT_HEADER_NAME), INSERT_HEADER_VALUE); }
Example 2
Source File: OAuthTest.java From burp-oauth with MIT License | 5 votes |
@Test public void testUpdateHeader() throws IOException { HttpRequest hr = reqWrapForTestInput(1); assertEquals(hr.getHeader(UPDATE_HEADER_NAME), UPDATE_HEADER_OLD); hr.setHeader(UPDATE_HEADER_NAME, UPDATE_HEADER_VALUE); assertEquals(hr.getHeader(UPDATE_HEADER_NAME), UPDATE_HEADER_VALUE); assertEquals(hr.getHeader("Connection"), "Keep-Alive"); // next one }