Main Content


Set HTTP header for OSLC client

Since R2021a



    setHttpHeader(myClient,header) assigns the custom HTTP header header to the OSLC client myClient. The custom header allows for HTTP methods. For more information, see methods.


    collapse all

    This example shows how to set a custom HTTP header for a configured OSLC client.

    Create a custom HTTP header by using the class constructor.

    header ='Content-Type','text/plain')
    header = 
      HeaderField with properties:
         Name: "Content-Type"
        Value: "text/plain"

    After you have created and configured an OSLC client as described in Create and Configure an OSLC Client for the Requirements Management Domain, assign the header to the OSLC client myClient.


    Input Arguments

    collapse all

    OSLC client, specified as an oslc.Client object.

    Custom HTTP header, specified as a object.


    Version History

    Introduced in R2021a