Skip to content

CORS error in SWIFT #21

@kkadapa

Description

@kkadapa

I keep getting CORS error on SWIFT, i have an account via Azure, is there a workaround to get this working?

statusCode should be 200, but is 400
response = Optional(<NSHTTPURLResponse: 0x60800042cf00> { URL: https://api.sendgrid.com/v3/mail/send } { Status Code: 400, Headers {
"Access-Control-Allow-Headers" = (
"Authorization, Content-Type, On-behalf-of, x-sg-elas-acl"
);
"Access-Control-Allow-Methods" = (
POST
);
"Access-Control-Allow-Origin" = (
"https://sendgrid.api-docs.io"
);
"Access-Control-Max-Age" = (
600
);
Connection = (
"keep-alive"
);
"Content-Length" = (
63
);
"Content-Type" = (
"application/json"
);
Date = (
"Wed, 18 Jul 2018 02:32:42 GMT"
);
Server = (
nginx
);
"X-No-CORS-Reason" = (
"https://sendgrid.com/docs/Classroom/Basics/API/cors.html"
);
} })
responseString = Optional("{"errors":[{"message":"Bad Request","field":null,"help":null}]}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions