OPTIONS method

The OPTIONS HTTP method is used for cross-origin resrouce sharing (CORS) to preflight the request. Normally CORS request do not need a preflight. A request is preflighted when:

  • It makes a request other than a POST or GET. Also, if POST is used to send request data with a Content-Type other than application/x-www-form-urlencoded, multipart/form-data, or text/plain, e.g. if the POST request sends a JSON payload to the server using application/json or text/json, then the request is preflighted.
  • It sets custom headers in the request.


Request Header with custom values

OPTIONS /v2/subscribers HTTP/1.1
Host: api.yesmail.com
api-user: ymnewsolutions
api-key: **********
Content-Type: application/json
Access-Control-Allow-Headers: X-Ping
Cache-Control: no-cache
Postman-Token: 2abe5618-9a12-376b-3c5d-6d357b61a7b9


200 Response with the following headers

Accept → */*
Accept-Encoding → gzip, deflate, sdch
Accept-Language → en-US,en;q=0.8
Access-Control-Allow-Headers → X-Ping, origin, accept, If-Match, Api-User, Api-Key, Content-Type
Access-Control-Allow-Methods → GET, PUT, POST, DELETE
Access-Control-Allow-Origin → *
Access-Control-Max-Age → 3628800
Cache-Control → no-cache
Connection → keep-alive
Content-Length → 0
Content-Type → application/json
Origin → chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop
Postman-Token → 66bf608c-e06c-10f7-11e0-f2eba7e4becc
Request-Uri → https://api.yesmail.com/v2/subscribers
Tracking-Id → dea4a872-42ab-43d7-ba64-9135bc080155
User-Agent → Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
X-Content-Type-Options → nosniff
X-Forwarded-For →
X-Forwarded-Port → 443
X-Forwarded-Proto → https
api-key → ***********
api-user → ymnewsolutions