ph http - phax/ph-commons GitHub Wiki
Generic HTTP-related utilities. Does not contain an HTTP client -- see ph-web/ph-httpclient for that.
Highlights:
-
CHttp- HTTP status code constants (aligned with RFC 9110) -
CHttpHeader- HTTP header name constants (including modern security headers) -
EHttpMethod- HTTP method enum (GET, POST, PUT, DELETE, PATCH, etc.) -
EHttpVersion- HTTP version enum (HTTP/1.0 through HTTP/3.0) -
HttpHeaderMap- HTTP header map implementation -
HttpBasicAuth/BasicAuthClientCredentials- HTTP Basic Authentication -
HttpDigestAuth/DigestAuthClientCredentials/DigestAuthServerBuilder- HTTP Digest Authentication (MD5 and SHA-256 per RFC 7616) -
CSPPolicy/CSPSourceList/CSPDirective- Content Security Policy builder -
PermissionsPolicy/PermissionsPolicyAllowList/PermissionsPolicyDirective- Permissions Policy builder -
CacheControlBuilder- Cache-Control header builder -
AcceptCharsetList/AcceptEncodingList/AcceptMimeTypeList- Accept header parsing -
ETLSVersion/TLSConfigurationMode- TLS version management -
QValue- quality value handling for content negotiation
Add the following to your pom.xml to use this artifact:
<dependency>
<groupId>com.helger.commons</groupId>
<artifactId>ph-http</artifactId>
<version>x.y.z</version>
</dependency>