Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Sending HTTP Requests to Web Services (Real-Time, Windows)

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Parent Topic: Overview: Web-based Communication with a LabVIEW Application

Web clients use URLs and HTTP methods to exchange data with controls on the connector pane of HTTP method VIs. For example, if you create an HTTP method VI that contains two numeric controls assigned to the connector pane, a web client can send values to those controls using a URL or HTTP method. The HTTP method VI can then return a response such as the sum of the numeric controls.

Note  For more information about concepts in this topic, refer to the Web services introduction and tutorial. LabVIEW Web services are available only in the LabVIEW Full Development System and the LabVIEW Professional Development System.

HTML forms, web browsers, the HTTP Client VIs, and HTTP-capable third-party applications can exchange data with HTTP method VIs using HTTP methods.

By default, an HTTP method VI returns data to web clients as an XML string. The XML string includes a summary of the indicator values assigned to the connector pane of the HTTP method VI. You also can configure an HTTP method VI to return data as an HTML-, plain text-, or JSON-formatted response. Configure the output format type on the HTTP Method VI Settings page of the Web Service Properties dialog box.

HTTP Methods

Web services support four standard HTTP methods used in web communication:

  • POST—Use to send data and upload files. You can use a common HTML form or other compatible client to submit information, known as post data, via the POST method.
  • GET—Use to retrieve data from a Web service.
  • PUT—Serves as an alternative method to POST for uploading files.
  • DELETE—Use to instruct the Web service to delete a specified resource.

Refer to the World Wide Web Consortium at www.w3.org for more information about HTTP method definitions, including the POST, GET, PUT, and DELETE methods.

Related Information


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit