A create method also exists to construct a request for any type. Since the POST, PUT and methods require a body, a second argument which is the body object is required.

    The following example demonstrates how to send a simply String body:

    Sending a String body

    Sending a String body

    Sending a String body

    1The POST method is used with the first argument being the URI and the second argument the body
    2The content type and accepted type are set to text/plain (the default content type is application/json)
    3The expected response type is a String