PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Using WDTestRest
  • URL parameters
  • Headers
  • Content
  • Authentication
  • Transmission
  • History
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
WDTestRest: Run the test of your REST Webservices
Overview
WDTestRest is used to test the calls to an HTTP REST Webservice or to run a Web API accessible by HTTP.
This tool is automatically started when running the test of a REST Webservice from the WINDEV or WEBDEV editor. The methods of Webservice whose test was run are automatically proposed.
Notes:
  • The following methods are supported: HTTP GET, POST, PUT, PATCH, DELETE, COPY and HEAD.
  • WDTestRest supports the HTTP and OAuth authentication systems.
  • You have the ability to manage the transmitted headers as well as the ones received during the execution.
  • The content of requests can be customized, in "Form-Data", "URLEncoded" or binary format.
Using WDTestRest

URL parameters

You have the ability to specify the URL parameters ("Parameters" button):
  • To add a parameter, type its name and its possible value.
  • To delete a parameter, click the "-" button associated with the parameter.
  • To modify a parameter, type the new values in the relevant controls.
  • To modify the order of parameters, keep the left mouse button down on the "" button of parameter and drag the mouse to the requested location. Release the left mouse button when it's done.

Headers

The "Headers" pane allows you to manage the headers that will be transmitted during the request.
The management of headers is performed like the management of URL parameters.
You also have the ability to manage the content of headers manually, via the "Rough edit" button.
Caution: in this case, the format must respect the one of HTTP headers.

Content

For the requests other than GET requests, a content can be transmitted with the request.
This content can correspond to form data, binary data, etc.
In the "Content" pane, choose the type of content to transmit via the "Type" combo box: the display will adapt according to your choice.
For the forms ("form-data" ou "urlencoded"), the edit of data is performed like the edit of headers and URL parameters.

Authentication

WDTestRest supports the basic HTTP authentication, with the user name and password that will be transmitted during the request.
You also have the ability to use the OAuth 2 authentication.
WDTestRest asks you to specify the OAuth connection information and it allows you to get the access token ("token") that will be used to run the request.
Note: You have the ability to store the OAuth authentication data for the future calls by checking the check box "Store token".

Transmission

When the request parametes are defined, click the "Send" button to transmit them to the specified URL.
At the end of request execution, the result is displayed at the bottom of window:
  • HTTP content (the response),
  • cookies,
  • headers.
Each pane is used to see the data received. The XML and JSON codes can be formatted according to your own requirement.
To get the WLanguage code corresponding to the call to the request, click the button "Generate the WL code".
Caution: the generated code is using new features of version 22.

History

Whenever sending an HTTP request, WDTestRest stores the full setting (URL, parameters, headers, content, etc.) in an history.
This history, accessible from the WDTestRest button, is used to re-run the previous requests.
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment