sendgrid-objc
sendgrid-objc copied to clipboard
CORS error in SWIFT
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}]}")