API Debugging

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
Current revision (14:19, 31 March 2014) (edit) (undo)
 
Line 2: Line 2:
[[API Home Page]]
[[API Home Page]]
-
For debugging and testing connectivity purposes, Helloworld provides these resources that will demonstrate that known responses can be retrieved and data can be sent to Helloworld web services.
+
For debugging and testing connectivity purposes, HelloWorld provides these resources that will demonstrate that known responses can be retrieved and data can be sent to HelloWorld web services.
<div class="api_table">
<div class="api_table">
Line 32: Line 32:
Testing the webservices prior to deployment, or during development is best done with a tool that will display the full HTTP communication interaction with the server, including all headers for the request and response. While certain resources can be viewed with a normal browser, it is not a recommended way to test or learn about the APIs since there is not enough information displayed.
Testing the webservices prior to deployment, or during development is best done with a tool that will display the full HTTP communication interaction with the server, including all headers for the request and response. While certain resources can be viewed with a normal browser, it is not a recommended way to test or learn about the APIs since there is not enough information displayed.
-
Helloworld developers often use cURL (http://en.wikipedia.org/wiki/CURL), or Wireshark (http://en.wikipedia.org/wiki/Wireshark) to examine the communication between the client and server. Some specific curl commands are listed here:
+
HelloWorld developers often use cURL (http://en.wikipedia.org/wiki/CURL), or Wireshark (http://en.wikipedia.org/wiki/Wireshark) to examine the communication between the client and server. Some specific curl commands are listed here:
Basic communication testing:
Basic communication testing:

Current revision

API Home Page

For debugging and testing connectivity purposes, HelloWorld provides these resources that will demonstrate that known responses can be retrieved and data can be sent to HelloWorld web services.

Output communication test GET /v1/{apikey}/test/communication
Output communication test (structured data) GET /v1/{apikey}/test/structured
Input communication test POST /v1/{apikey}/test/communication
Input URL communication test PUT /v1/{apikey}/test/communication/{value}
Error response test PUT /v1/{apikey}/test/communication

Testing the webservices prior to deployment, or during development is best done with a tool that will display the full HTTP communication interaction with the server, including all headers for the request and response. While certain resources can be viewed with a normal browser, it is not a recommended way to test or learn about the APIs since there is not enough information displayed.

HelloWorld developers often use cURL (http://en.wikipedia.org/wiki/CURL), or Wireshark (http://en.wikipedia.org/wiki/Wireshark) to examine the communication between the client and server. Some specific curl commands are listed here:

Basic communication testing:

%curl -i -T /dev/null http://localhost:8080/v1/solution/ews/test/communication/TEST%2F%E2%99%A1ING
%curl -i -d value=TEST%2F%E2%99%A1ING http://localhost:8080/v1/solution/ews/test/communication
%curl -i http://localhost:8080/v1/solution/ews/test/communication

Passing form parameters with curl, also request certain content types:

%curl -i -d value=TEST%2F%E2%99%A1ING http://localhost:8080/v1/solution/ews/test/communication.xml 
%curl -i -d value=TEST%2F%E2%99%A1ING http://localhost:8080/v1/solution/ews/test/communication.json
%curl -i -d value=TEST%2F%E2%99%A1ING http://localhost:8080/v1/solution/ews/test/communication.yaml
%curl -i -d value=TEST%2F%E2%99%A1ING http://localhost:8080/v1/solution/ews/test/communication.txt

Passing Accept: Headers with curl:

%curl -i -H "Accept: application/json" -d value=TEST%2F%E2%99%A1ING http://localhost:8080/v1/solution/ews/test/communication
Personal tools