tencent cloud

Performance Testing Service

Overview
Purchase Guide
Billing Overview
Pay-as-You-Go (postpaid)
Purchasing Channels
Payment Overdue
Refund Instructions
Quick Start
Operation Guide
Performance Testing in Simple Mode
Performance Testing in Script Mode
Performance Testing in JMeter Mode
Project Management
Scenario Management
Traffic Recording
Environment Management
Scheduled Performance Testing
Performance Testing Report
Access Control
Alarm Management
Tag Management
Error Code Manual
Practice Tutorial
Using Prometheus To Monitor Performance Testing Metrics
Using PTS to Playback Requests Recorded by GoReplay
API Documentation
History
Introduction
API Category
Making API Requests
PTS-related APIs
Data Types
Error Codes
JavaScript API List
Overview of JavaScript API List
pts/global
pts/http
pts
pts/dataset
pts/grpc
pts/jsonpath
pts/protobuf
pts/redis
pts/sql
pts/url
pts/util
pts/ws
pts/socketio
pts/socket
FAQs
Related Agreements
Service Level Agreement
Use Limits
Privacy Policy
Data Processing And Security Agreement

URLSearchParams.append

PDF
Focus Mode
Font Size
Last updated: 2025-03-10 17:23:44
URLSearchParams.append is used to add the specific key-value pair as a search parameter.
append(key: string, value: string | number): void

Parameters

Parameter
Type
Description
key
string
Key
value
string or number
Value

Return

Type
Description
void
No data returned.

Samples

Add the specified key-value pair as a search parameter:
import url from 'pts/url';

export default function() {
const params = new url.URLSearchParams('key1=value1');

params.append('key2', 'value2');
console.log(params.toString()); // key1=value1&key2=value2
}


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback