Table of Contents

Search

  1. Preface
  2. Introduction to REST V2 Connector
  3. Connections for REST V2
  4. REST V2 operations
  5. Mappings and mapping tasks with REST V2 Connector
  6. Swagger File Generation
  7. Appendix A: Swagger objects
  8. OpenAPI objects

REST V2 Connector

REST V2 Connector

Parsing response headers

Parsing response headers

You can parse the header content in a response sent by a REST API endpoint.
Use the
headers
tag in the swagger file to parse the header content. By using the
Set-Cookie
tag, you can also parse the cookie content as part of the
header
tag. REST V2 Connector parses fields defined in the swagger file. Any extra fields coming from the web service for header or cookies appear under
OtherResponseHeaders
or
OtherCookies
fields respectively.
Defining Response Headers
"responses" : {
....
"headers": {
"places": {
"type": "string",
"description": "calls per hour allowed by the user"
},
"sessionId": {
"type": "integer",
"description": "date in UTC when token expires"
},
"Set-Cookie/activeSession": {
"type": "string",
"description": "cookies sample"
},
"Set-Cookie/PhoneId": {
"type": "integer",
"description": "cookies sample"
}
}
The
Set-Cookie
tag is case-sensitive.

0 COMMENTS

We’d like to hear from you!