Versions Compared

Key

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

...

If you don't want to escape any characters, but still want to use curl - implement the "file input" option to create a file that looks like the following:

 

Tip
titleExample
 

<token>

<username>sample_username</username>
  <password>sample-password</password>
  <client_id>client_name_of_your_choosing</client_id>
  <user_ip_address>your_origin_ip_address</user_ip_address>
  <provider>Provider Id</provider>
</token>

...


*Note: mytokengenerator.xml can be used as a file name, which simplifies the command.  See example underneath step 2 for original command and the example below for simplified command.

 

 

 

Tip
titleExample

...

curl -X POST --header "Content-Type: application/xml" -d @mytokengenerator.xml https://api-test.echo.nasa.gov/echo-rest/tokens

 

 

 

Note:  if using a programming language, just place the curl example parts into the correct http message header or body locations.

...