-
Notifications
You must be signed in to change notification settings - Fork 14
Detailed resource view relay
Return to Home
Main entry point for Rush functionality, along with Policies allows to relay any HTTP request to any target host. Path, Method, Query params, Headers and Protocol will be bypassed to target host.
POST - GET - DELETE - PUT
http://[RUSH-HOST]/
Body contents will be bypassed to target host.
Query params will be bypassed to target host.
URL Path will be bypassed to target host.
#### HEADERS Headers different than "x-relayer-*" will by bypassed to target host.
Header "x-relayer-host" is mandatory for this entry point.
Returns a 201 response including a body with a JSON representation of an object with one field, id
for the unique identifier of the request
Example:
{
"id":"d0180450-ceba-11e2-b373-81b8fff86037"
}
Invalid requests will return a 400 code with a body response in JSON format, including two or three fields:
-
exceptionID
: Exception identifier according to UNICA -
exceptionText
: Exception Text according to UNICA -
userMessage
(optional): Additional info
The possible errors are:
{
"exceptionId": "SVC1000",
"exceptionText": "Missing mandatory parameter: x-relayer-host"
}
{
"exceptionId": "SVC0002",
"exceptionText": "Invalid parameter value: x-relayer-host",
"userMessage": "Valid format: host[:port]"
}
{
"exceptionId": "SVC0002",
"exceptionText": "Invalid parameter value: x-relayer-retry",
"userMessage": "Invalid retry value: VALUE"
}
{
"exceptionId": "SVC0003",
"exceptionText": "Invalid parameter value: x-relayer-persistence. Possible values are: BODY, STATUS, HEADER"
}
{
"exceptionId": "SVC0003",
"exceptionText": "Invalid parameter value: x-relayer-protocol. Possible values are: http, https"
}
{
"exceptionId": "SVC0002",
"exceptionText": "Invalid parameter value: x-relayer-httpcallback",
"userMessage": "Protocol is not defined"
}
{
"exceptionId": "SVC0002",
"exceptionText": "Invalid parameter value: x-relayer-httpcallback",
"userMessage": "Invalid protocol ftp:"
}
Valid request
> GET / HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
> Host: localhost:5001
> Accept: */*
> x-relayer-host: http://www.google.es
> x-relayer-persistence: BODY
>
< HTTP/1.1 200 OK
< Date: Thu, 06 Jun 2013 15:07:32 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
{"id":"d0180450-ceba-11e2-b373-81b8fff86037"}
Invalid request
> GET / HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
> Host: localhost:5001
> Accept: */*
> x-relayer-host: www.googgle.es
> x-relayer-retry: WRONG
> x-relayer-persistence: WRONG
>
< HTTP/1.1 400 Bad Request
< Date: Thu, 06 Jun 2013 15:14:31 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
{"exceptionId": "SVC1000","exceptionText": "Missing mandatory parameter: x-relayer-host"}
Return to Home
1 - OVERVIEW
2 - API REFERENCE
2.1 - General Notes
2.1.1 - URI Structure
2.1.2 - HTTP Methods
2.1.3 - Security
2.1.4 - Errors
2.1.5 - Encoding
2.2 - REST Resources
2.3 - Data Models
3 - GETTING STARTED
4 - CONTRIBUTE
4.1 - Development Environment Setup
4.2 - How to Run the Tests (unit and acceptance)
4.3 - Tip & Tricks
5 - ANNEX
5.1 - Architecture