1
"우리는 지정되지 않은 JSON 구문 분석 오류가 발생했습니다"반환 사용하여 메일 침프 목록에 사용자를 구독 나는 다음컬 항상
라고 배치 파일을 생성하는 응용 프로그램이 내가 메일 침프 목록에 가입자를 추가 할 필요가있다
curl.exe -v --request POST --url "https://us11.api.mailchimp.com/3.0/lists/list_id/members" --user "anystring:api_key" --header "content-type: application/json" --data "{"email_address":"[email protected]", "status":"subscribed"}" --include
제안 된대로 요청을 업데이트했지만 여전히 오류가 있습니다. 그렇습니다. 여기서 큰 따옴표가 문제가되는 것처럼 보입니다.
{"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"JSON Parse Error","status":400,"detail":"We encountered an unspecified JSON parsing error.","instance":""}
Note: Unnecessary use of -X or --request, POST is already inferred.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 92.123.199.167...
* Connected to us11.api.mailchimp.com (92.123.199.167) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: C:\DevPB\Epos\ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [104 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2662 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2/ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=Georgia; L=Atlanta; O=The Rocket Science Group, LLC; OU=IT; CN=*.api.mailchimp.com
* start date: May 3 00:00:00 2016 GMT
* expire date: May 3 23:59:59 2017 GMT
* subjectAltName: host "us11.api.mailchimp.com" matched cert's "*.api.mailchimp.com"
* issuer: C=US; O=GeoTrust Inc.; CN=GeoTrust SSL CA - G3
* SSL certificate verify ok.
* Server auth using Basic with user 'anystring'
} [5 bytes data]
> POST /3.0/lists/XXXXXXXX/members HTTP/1.1
> Host: us11.api.mailchimp.com
> Authorization: Basic XXXXXXXXXXXXXXXXXXXXX
> User-Agent: curl/7.50.1
> Accept: */*
> content-type: application/json
> Content-Length: 69
>
} [69 bytes data]
* upload completely sent off: 69 out of 69 bytes
{ [5 bytes data]
< HTTP/1.1 400 Bad Request
< Server: openresty
< Content-Type: application/problem+json; charset=utf-8
< Content-Length: 203
< X-Request-Id: 145d8a92-f4c5-4a83-8e1f-f72cf7850c45
< Link: <https://us11.api.mailchimp.com/schema/3.0/ProblemDetailDocument.json>; rel="describedBy"
< Date: Wed, 18 Jan 2017 13:42:59 GMT
< Connection: close
< Set-Cookie: _AVESTA_ENVIRONMENT=prod; path=/
<
{ [203 bytes data]
100 272 100 203 100 69 419 142 --:--:-- --:--:-- --:--:-- 419
* Closing connection 0
} [5 bytes data]
* TLSv1.2 (OUT), TLS alert, Client hello (1):
} [2 bytes data]
C:\DevPB\Epos>
문제를 해결했습니다. –
위의 작품과 이메일이 구독되었지만. 왜 출력 결과가 HTTP/1.1 400 Bad Request인지 궁금합니다. –
* 완전히 퇴장 업로드 : 71 (71)의 출력 바이트를