Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One of the more common problems people have is the first web service request and often it can be due to the authentication.  Our web service calls use Basic HTTP authentication with Base64 encoding.  As an example, given an email address and password me@letmein.com:MyPassw0rd!, you can run the following command in Linux to get the base64

Code Block
languagebash
#$ echo -n vendor_healthcheck@emulator.com:Password1 | base64
dmVuZG9yX2hlYWx0aGNoZWNrQGVtdWxhdG9yLmNvbTpQYXNzd29yZDE=

Once you have the output from this command, you can then include it in the --header command for your curl command to make the website request (Note the --header parameter with the string from above)

Code Block
languagebash
#$ /usr/bin/curl -k -A "Mozilla/5.0" -i -c cookies/cookies. --header "Authorization: Basic dmVuZG9yX2hlYWx0aGNoZWNrQGVtdWxhdG9yLmNvbTpQYXNzd29yZDE=" --data "type=DOMESTIC&webUserName=pilot_aa%40emulator.com&flightRules=VFR&aircraftIdentifier=MESSN&departure=HOU&destination=MIA&departureInstant=2015-03-13T00:53:00.0&flightDuration=PT1H30M&route=LEV%20Q102%20CYY%20SSCOT&altDestination1=LAX&altDestination2=SEA&aircraftType=P28A&numberOfAircraft=3&heavyWakeTurbulence=true&aircraftEquipment=G&remarks=This%20is%20a%20domestic%20flight%20plan%20test&speedKnots=100&altitudeFL=35&fuelOnBoard=PT20H0M&pilotData=PILOT%20INFO&peopleOnBoard=1&aircraftColor=W" "http://www.elabs.testafss.net/Website2/rest/FP/file" -v

...