Search Unity

Http curl request

Discussion in 'Scripting' started by RoyalCoder, Apr 14, 2021.

  1. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hi friends,

    I need to use an HTTP request via UnityWebRequest how can I achieve this any help will be much appreciated, thanks!

    Code (CSharp):
    1. curl -X POST  -d '{
    2.  "registrationNumber": "string"
    3. }' https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry/v1/vehicles \
    4. -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'x-api-key: string' -H 'X-Correlation-Id: string'
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    I would recommend beginning with some tutorials for the UnityWebRequest API.

    Screen Shot 2021-04-14 at 3.31.44 PM.png
     
    RoyalCoder likes this.