RestRequest.AddQueryParameter

Overview

Registers a new query string parameter.

RestRequest myRestRequest.AddQueryParameter(name: string, value: string)

Arguments

string name

Name of query string parameter

string value

Value of query string parameter

Remarks

Name argument is required.

Example

var client = $Rest.Create('http://targetserver'); var request = client.Request(); request.AddQueryParameter('x',1); var response = request.Execute(); // executed url : http://targetserver/?x=1

Copyright © 2010 - 2023 Emakin. All rights reserved.