Skip to content

Comments

fix(client): update Content-Type in GraphsAPI for adding graphs#714

Open
chgjin wants to merge 1 commit intoapache:masterfrom
chgjin:patch-1
Open

fix(client): update Content-Type in GraphsAPI for adding graphs#714
chgjin wants to merge 1 commit intoapache:masterfrom
chgjin:patch-1

Conversation

@chgjin
Copy link

@chgjin chgjin commented Feb 24, 2026

fix #713

Fix the error in the Content-Type definition in the create interface of Graphs, and change it to application/json.

修正Graphs 的 create 接口中 Content-Type 定义错误的问题,改为application/json
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 24, 2026
@github-actions github-actions bot added the client hugegraph-client label Feb 24, 2026
@dosubot dosubot bot added the bug Something isn't working label Feb 24, 2026
public Map<String, String> create(String name, String cloneGraphName, String configText) {
this.client.checkApiVersion("0.67", "dynamic graph add");
RestHeaders headers = new RestHeaders().add(RestHeaders.CONTENT_TYPE, "text/plain");
RestHeaders headers = new RestHeaders().add(RestHeaders.CONTENT_TYPE, "application/json");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need to add a test for it to ensure it won't be broken in the future

@imbajin imbajin changed the title Update GraphsAPI.java fix(client): update Content-Type in GraphsAPI for adding graphs Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client hugegraph-client size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 在包 org.apache.hugegraph.api.graphs 中 create 方法定义了Content-Type 为 text/plain,会导致接口返回415错误。

2 participants