Skip to content

Commit 2481fc6

Browse files
release: 0.5.0 (#6)
* feat: /end endpoint returns empty object * feat(client): add `HttpRequest#url()` method * docs: prominently feature MCP server setup in root SDK readmes * feat: Added optional param to force empty object * codegen metadata * release: 0.5.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 7135947 commit 2481fc6

File tree

13 files changed

+371
-47
lines changed

13 files changed

+371
-47
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.0"
2+
".": "0.5.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-ed52466945f2f8dfd3814a29e948d7bf30af7b76a7a7689079c03b8baf64e26f.yml
3-
openapi_spec_hash: 5d57aaf2362b0d882372dbf76477ba23
4-
config_hash: 8ec9eaf59304f664cf79f73de1488671
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-39cd9547d16412cf0568f6ce2ad8d43805dffe65bde830beeff630b903ae3b38.yml
3+
openapi_spec_hash: 9cd7c9fefa686f9711392782d948470f
4+
config_hash: 3c21550e2c94cad4339d3093d794beb0

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 0.5.0 (2026-01-07)
4+
5+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/browserbase/stagehand-java/compare/v0.4.0...v0.5.0)
6+
7+
### Features
8+
9+
* /end endpoint returns empty object ([058cf38](https://github.com/browserbase/stagehand-java/commit/058cf3853b589356fe0b88d5899c98e4c44c8f19))
10+
* Added optional param to force empty object ([a93f1bf](https://github.com/browserbase/stagehand-java/commit/a93f1bf0324f4fa0b1bd96122d29534ff03cd9b2))
11+
* **client:** add `HttpRequest#url()` method ([5a4d99f](https://github.com/browserbase/stagehand-java/commit/5a4d99fd20473dcd6045fb65d8230c3894734364))
12+
13+
14+
### Documentation
15+
16+
* add full working example script to readme and stagehand-java-example ([#5](https://github.com/browserbase/stagehand-java/issues/5)) ([7135947](https://github.com/browserbase/stagehand-java/commit/713594728cd301df4587bdb0337a5047695704eb))
17+
* prominently feature MCP server setup in root SDK readmes ([0c7cb02](https://github.com/browserbase/stagehand-java/commit/0c7cb0241f65547071fcd15e7bce41f621cfbfcb))
18+
319
## 0.4.0 (2026-01-05)
420

521
Full Changelog: [v0.3.0...v0.4.0](https://github.com/browserbase/stagehand-java/compare/v0.3.0...v0.4.0)

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.browserbase.api/stagehand-java)](https://central.sonatype.com/artifact/com.browserbase.api/stagehand-java/0.4.0)
6-
[![javadoc](https://javadoc.io/badge2/com.browserbase.api/stagehand-java/0.4.0/javadoc.svg)](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.4.0)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.browserbase.api/stagehand-java)](https://central.sonatype.com/artifact/com.browserbase.api/stagehand-java/0.5.0)
6+
[![javadoc](https://javadoc.io/badge2/com.browserbase.api/stagehand-java/0.5.0/javadoc.svg)](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.5.0)
77

88
<!-- x-release-please-end -->
99

1010
The Stagehand Java SDK provides convenient access to the [Stagehand REST API](https://docs.stagehand.dev) from applications written in Java.
1111

1212
It is generated with [Stainless](https://www.stainless.com/).
1313

14+
## MCP Server
15+
16+
Use the Stagehand MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
17+
18+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=stagehand-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInN0YWdlaGFuZC1tY3AiXX0)
19+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22stagehand-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22stagehand-mcp%22%5D%7D)
20+
21+
> Note: You may need to set environment variables in your MCP client.
22+
1423
<!-- x-release-please-start-version -->
1524

16-
The REST API documentation can be found on [docs.stagehand.dev](https://docs.stagehand.dev). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.4.0).
25+
The REST API documentation can be found on [docs.stagehand.dev](https://docs.stagehand.dev). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.5.0).
1726

1827
<!-- x-release-please-end -->
1928

@@ -24,7 +33,7 @@ The REST API documentation can be found on [docs.stagehand.dev](https://docs.sta
2433
### Gradle
2534

2635
```kotlin
27-
implementation("com.browserbase.api:stagehand-java:0.4.0")
36+
implementation("com.browserbase.api:stagehand-java:0.5.0")
2837
```
2938

3039
### Maven
@@ -33,7 +42,7 @@ implementation("com.browserbase.api:stagehand-java:0.4.0")
3342
<dependency>
3443
<groupId>com.browserbase.api</groupId>
3544
<artifactId>stagehand-java</artifactId>
36-
<version>0.4.0</version>
45+
<version>0.5.0</version>
3746
</dependency>
3847
```
3948

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99

1010
allprojects {
1111
group = "com.browserbase.api"
12-
version = "0.4.0" // x-release-please-version
12+
version = "0.5.0" // x-release-please-version
1313
}
1414

1515
subprojects {

stagehand-java-core/src/main/kotlin/com/browserbase/api/core/http/HttpRequest.kt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.browserbase.api.core.http
22

33
import com.browserbase.api.core.checkRequired
44
import com.browserbase.api.core.toImmutable
5+
import java.net.URLEncoder
56

67
class HttpRequest
78
private constructor(
@@ -13,6 +14,35 @@ private constructor(
1314
@get:JvmName("body") val body: HttpRequestBody?,
1415
) {
1516

17+
fun url(): String = buildString {
18+
append(baseUrl)
19+
20+
pathSegments.forEach { segment ->
21+
if (!endsWith("/")) {
22+
append("/")
23+
}
24+
append(URLEncoder.encode(segment, "UTF-8"))
25+
}
26+
27+
if (queryParams.isEmpty()) {
28+
return@buildString
29+
}
30+
31+
append("?")
32+
var isFirst = true
33+
queryParams.keys().forEach { key ->
34+
queryParams.values(key).forEach { value ->
35+
if (!isFirst) {
36+
append("&")
37+
}
38+
append(URLEncoder.encode(key, "UTF-8"))
39+
append("=")
40+
append(URLEncoder.encode(value, "UTF-8"))
41+
isFirst = false
42+
}
43+
}
44+
}
45+
1646
fun toBuilder(): Builder = Builder().from(this)
1747

1848
override fun toString(): String =

0 commit comments

Comments
 (0)