Skip to content

Commit c4daa0e

Browse files
committed
Merge branch 'develop/1.8'
2 parents 129581d + 382f8c4 commit c4daa0e

File tree

77 files changed

+3378
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3378
-380
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
## [Unreleased]
88

9-
Nothing yet.
9+
_Changes since 1.7.3_
10+
11+
### Added
12+
- Cookie support (Default disabled. Enable in the Subproject Configuration Dialog)
13+
- On pre-flight, update environment variables according to request headers, query parameters and bodies
14+
- A "Save Raw" button at the response viewer to save raw response body to a file
15+
- A floating copy button, next to a literal value under the mouse cursor and in the response body JSON, for copying the literal value
16+
17+
### Changed
18+
- The "Copy All" button near the response body viewer has been relocated to the upper level, as it copies the whole Request and Response rather than only response body
19+
- The "Copy All" button under the response tab "Raw" has been renamed to "Copy"
20+
- The copying content of the above two copy functions now includes the request name and example name as the heading
21+
22+
### Fixed
23+
- Crash when selecting the last tab of a HTTP request then switching to a gRPC or WS request
1024

1125

1226
## [1.7.3] -- 2025-04-29

build.gradle.kts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins {
1111
}
1212

1313
group = "com.sunnychung.application"
14-
version = "1.7.3" // must be in 'x.y.z' for native distributions
14+
version = "1.8.0-SNAPSHOT" // must be in 'x.y.z' for native distributions
1515

1616
repositories {
1717
google()
@@ -94,7 +94,10 @@ kotlin {
9494
implementation("org.bouncycastle:bcpkix-jdk18on:1.79")
9595

9696
// text field
97-
api("io.github.sunny-chung:bigtext-ui-composable:2.2.0")
97+
api("io.github.sunny-chung:bigtext-ui-composable:2.3.0")
98+
99+
// for proguard to understand the code
100+
// implementation("com.github.luben:zstd-jni:1.5.5-11")
98101
}
99102

100103
resources.srcDir("$buildDir/resources")
@@ -216,5 +219,10 @@ compose.desktop {
216219
iconFile.set(project.file("appicon/appicon.png"))
217220
}
218221
}
222+
223+
buildTypes.release.proguard {
224+
version.set("7.5.0")
225+
configurationFiles.from(project.file("proguard.pro"))
226+
}
219227
}
220228
}
144 KB
Loading
135 KB
Loading
84.9 KB
Loading
30 KB
Loading
137 KB
Loading

doc/features/cookie.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Cookie
3+
---
4+
5+
# HTTP Cookie
6+
7+
## Enable or Disable
8+
9+
To enable Cookie support, first enable in the Subproject Configuration dialog. It would affect the whole Subproject.
10+
11+
By default, Cookie is disabled.
12+
13+
![Enable Cookie Step 1](../cookie-enable-step-1.png)
14+
15+
![Enable Cookie Step 2](../cookie-enable-step-2.png)
16+
17+
## Receive Cookie
18+
19+
To receive Cookie from servers, an environment must be selected or created. Cookie storage is not shared among multiple environments.
20+
21+
## Send Cookie
22+
23+
If Cookie is enabled, the Cookie storing in the storage would be applied to matching requests automatically. To examine what Cookie would be applied, check the Cookie tab in the Request Example level.
24+
25+
To send custom Cookie in additional to stored Cookie, one can insert Cookie in the Cookie tab in the Request Example level:
26+
27+
![Cookie Editor in Request Example](../cookie-editor-in-request-example.png)
28+
29+
or in the Environment level:
30+
31+
![Cookie Editor 1 in Environment](../cookie-editor-1-in-environment.png)
32+
33+
![Cookie Editor 2 in Environment](../cookie-editor-2-in-environment.png)
34+
35+
## Variables and Functions
36+
37+
Variables and functions are supported only in the "value" field.
38+
39+
However, Cookie containing variable and function macros in the "Set-Cookie" response headers are automatically dropped for security reasons.
40+
41+
For example, in the following response, only the cookie "cookie1" would be stored.
42+
43+
```
44+
HTTP/1.1 204 No Content
45+
Set-Cookie: cookie0=some-${{var}}; Max-Age=3600
46+
Set-Cookie: cookie1=AbcDE; Max-Age=3600
47+
```
48+
49+
## Applicable Transports
50+
51+
All types of supported HTTP transport, including WebSocket, GraphQL and gRPC, support Cookie. Note that response headers "Set-Cookie" only take effect after the entire request is completed.

doc/features/user-script.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ fun Request<*>.getResolvedUri(): String
7676
* Get variables merged from the selected environment, the base request example and the selected request example.
7777
*/
7878
fun Request<*>.getApplicableVariables(): Map<String, String>
79+
80+
fun Request<*>.getApplicableCookies(): Map<String, String>
7981
```
8082

8183
#### `MutableRequest`

doc/features/viewing-responses.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ The copied text is in a markdown-like format for readability.
6060

6161
Sample of copied text of a simple HTTP call:
6262
``````markdown
63+
Test POST Request - with Unicode JSON body
64+
==========================================
65+
6366
Request
6467
-------
6568
Start Time: 2024-02-18 23:33:31.426 (+08:00)
@@ -136,6 +139,9 @@ Body:
136139

137140
Sample of copied text of a GraphQL subscription call:
138141
``````markdown
142+
Test GraphQL subscription - Intervals
143+
=====================================
144+
139145
Request
140146
-------
141147
Start Time: 2024-02-18 23:35:03.259 (+08:00)
@@ -217,6 +223,9 @@ Closed by us with code 1000
217223

218224
Sample of copied text of a gRPC bidirectional call:
219225
``````markdown
226+
My gRPC Request - Bidirectional
227+
===============================
228+
220229
Request
221230
-------
222231
Start Time: 2024-02-18 23:49:43.670 (+08:00)
@@ -304,12 +313,15 @@ grpc-status: 0
304313

305314
### Copy Entire Transport Log
306315

307-
Click "Copy All" button in the "Raw" tab.
316+
Click "Copy" button in the "Raw" tab.
308317

309318
Copied texts are in a table format. It can be imported into spreadsheet softwares, or selected or manipulated in major code editors that support vertical selections, for example, Sublime Text. Don't forget to turn off "word wrap" while viewing the table in code editors.
310319

311320
Sample of copied text:
312321
``````
322+
Test POST Request - with Unicode JSON body
323+
==========================================
324+
313325
Time | Dir | Stream | Detail
314326
=================================|=====|========|===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
315327
2024-02-18 23:33:31.432 (+08:00) | - | * | DNS resolution of domain [httpbin.org] started

0 commit comments

Comments
 (0)