-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
package com.yezhaodan;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
public class AuthenticationUtil {
public static final String USER_MSG="你的用户名:你的密码";
public static HttpHeaders getHttpHeaders() {
HttpHeaders headers = new HttpHeaders();
//String base64UserMsg = Base64.getEncoder().encodeToString(USER_MSG.getBytes());
headers.set("Content-Type", "application/json;charset=utf-8");
headers.set("Cache-Control", "no-cache");
//headers.set("User-Agent", "curl/7.58.0");
//headers.set("Authorization","Basic " + base64UserMsg);
//headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
headers.set("Accept", MediaType.APPLICATION_JSON_UTF8_VALUE);
return headers;
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels