Package: ContentTypeApplicationJsonHeader
ContentTypeApplicationJsonHeader
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ContentTypeApplicationJsonHeader() |
|
|
|
|
|
Coverage
1: /*******************************************************************************
2: * Copyright (c) 2020, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.elasticsearch.client.rest.utils;
14:
15: import org.apache.http.HttpHeaders;
16: import org.apache.http.entity.ContentType;
17: import org.apache.http.message.BasicHeader;
18:
19: /**
20: * Utility class that initializes a {@link BasicHeader} with parameters:
21: * <ul>
22: * <li>{@code name}: {@link HttpHeaders#CONTENT_TYPE}</li>
23: * <li>{@code value}: {@link ContentType#APPLICATION_JSON}</li>
24: * </ul>
25: * <p>
26: * Hence the name, what a surprise!
27: *
28: * @since 1.3.0
29: */
30: public class ContentTypeApplicationJsonHeader extends BasicHeader {
31:
32: /**
33: * Constructor.
34: *
35: * @since 1.3.0
36: */
37: public ContentTypeApplicationJsonHeader() {
38: super(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.toString());
39: }
40: }