Versions Compared

Key

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

Table of Contents

Overview

WCS integrates with the back-end server using REST / HTTP calls or REST Methods as we call them.

...

REST methods should be implemented as simple HTTP / HTTPS scripts that work in pair with JSON in the body of an HTTP request and return JSON in the HTTP body of responses.

Request

Protocol

HTTP / HTTPS

URL

http://path/method или https://path/method

Method

POST

Content-Type

application/json

Body

JSON

Response

In response, WCS should receive a standard HTTP response containing the body of JSON

status

200

Reason phrase

OK

Body

JSON

Backend server response delays handling

Backend server response to WCS requests delays are possible under high load. Maximum di=uration of such delays can be controlled with the following parameter in flashphoner.properties file

Code Block
languagebash
themeRDark
rest_request_timeout=15

By default, maximum backend server response delay duration set to 15 seconds. If backend response is not received during this time, the exception will be printed to server logs

Code Block
languagebash
themeRDark
09:05:17,012 ERROR           RestClient - API-ASYNC-pool-12-thread-2 Got exception in REST 
java.net.SocketTimeoutException: Read timed out

The error will be handled as set in restClientConfig.

It is stringly recommended to set maximum backend server response delay duration from 1 to 10 seconds. The value

Code Block
languagebash
themeRDark
rest_request_timeout=0

fully disables delay control.