You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`Unsupported URL for validating article: ${path}`);
95
+
};
96
+
97
+
/**
98
+
* Constructs a DCR URL for a given path and query parameters.
99
+
* @param params The parameters for constructing the DCR URL
100
+
* @param params.path The path for a DCR endpoint
101
+
* @param params.queryParamsOn Whether to append query parameters to the URL
102
+
* @param params.queryParams Query parameters to append to the request
103
+
* @returns The DCR URL
104
+
* e.g. `http://localhost:9000/Article/https://theguardian.com/sport/live/2022/mar/27/west-indies-v-england-third-test-day-four-live?adtest=fixed-puppies-ci&live=true&force-liveblog-epic=true`
105
+
*/
68
106
constgetDcrUrl=({
69
107
path,
70
108
queryParamsOn,
@@ -76,10 +114,17 @@ const getDcrUrl = ({
76
114
...queryParams,
77
115
}).toString()}`
78
116
: '';
79
-
80
117
return`${ORIGIN}${path}${paramsString}`;
81
118
};
82
119
120
+
/**
121
+
* Constructs a DCR POST URL for a given path.
122
+
* @param path The path for a DCR endpoint
123
+
* e.g. `/Article/https://www.theguardian.com/world/2025/aug/19/the-big-church-move-sweden-kiruna-kyrka`
124
+
* @returns The DCR POST URL to send the request to
125
+
* e.g. `http://localhost:9000/Article`
126
+
* This is used to override the request method to POST in Playwright tests.
0 commit comments