Home > Net >  On the issue of the c # call the curl command, familiar with the curl command under the help of busy
On the issue of the c # call the curl command, familiar with the curl command under the help of busy

Time:10-14

paypal official interface
 curl -v - X \ POST https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-27803/provide-evidence 
- H "content-type: multipart/related; A boundary=-- WebKitFormBoundary7MA4YWxkTrZu0gW \
"-h "Authorization: Bearer Access - Token" \
The -f 'input={
"Evidences" : [
{
"Evidence_type" : "PROOF_OF_FULFILLMENT,"
"Evidence_info" : {
"Tracking_info" : [
{
"Carrier_name" : "FEDEX,"
"Tracking_number" : "122533485"
}
]
},
"The notes" : "Test"
}
]
}; Type=application/json '\
The -f 'file1=@ NewDoc. PDF'

c # code and generate the command
 CMD="curl -v - X POST https://api.paypal.com/v1/customer/disputes/" + dirName + "/dojo.provide - evidence" 
+ "- H " content-type: multipart/related; A boundary=- WebKitFormBoundary7MA4YWxkTrZu0gW \ ""
+ "- H " Authorization: Bearer "+ token +" \ ""
+ "-f 'input={\ \ " evidences \ \ \ ": [{\ \ " evidence_type \ \ \ ": \ \ " PROOF_OF_FULFILLMENT \ \ \ ", \ \ \ "evidence_info \ \ " : "
+ "{\ \ " tracking_info \ \ \ ": [{\ \ " carrier_name \ \ \ ": \ \ " "+ expressType +" \ \ \ ", \ \ \ "tracking_number \ \ " : \ \ \ "" + expressNo +" \ \ \ "}]}, "
+ "\ \ " notes \ \ \ ": \ \ " "+ expressTxt +" \ \ \ "}}; Type="application/json '
+ "-f" file1=@ \ \ \ "" + filePng FullName +" \ \ \ "'";

 curl -v - X POST https://api.paypal.com/v1/customer/disputes/PP-D-79024859/provide-evidence - H "content-type: multipart/related; A boundary=- WebKitFormBoundary7MA4YWxkTrZu0gW "-h" Authorization: Bearer A21AAMsI4ZYkaJbKfvCWwaqXc98PSq71uZoVqhJOzVy RzLIt76922GcGHmdKIK1MhCPWupKXq1C0Teny49LiCNrH7U4jIs3w "- F 'input={" evidences \ ": [{" evidence_type \ ": " PROOF_OF_FULFILLMENT \ ", \ "evidence_info " : {\ "tracking_info " : [{\ "carrier_name " : \ "CN_CHINA_POST_EMS ", \ "tracking_number " : \ "LZ273548120CN \}]}, " notes \ ": " test \}]}. Type=application/json '-f file1=@ \ "C: \ Users \ Administrator/Desktop/PP/PP - D - 79024859 \ LZ273548120CN PNG " "

returns the
 c: \ Windows \ System32 & gt; The curl -v - X POST https://api.paypal.com/v1/customer/disputes/
PP - D - 79024859/dojo.provide - evidence - H "content-type: multipart/related; A boundary=
-- -- WebKitFormBoundary7MA4YWxkTrZu0gW - "H" Authorization: Bearer A21AAMsI4ZYkaJbKfv
CWwaqXc98PSq71uZoVqhJOzVy - RzLIt76922GcGHmdKIK1MhCPWupKXq1C0Teny49LiCNrH7U4jIs3w
"The -f 'input={\ "evidences " : [{\ "evidence_type " : \ "PROOF_OF_FULFILLMENT ", \ "evide
Nce_info \ ": {" tracking_info \ ": [{" carrier_name \ ": " CN_CHINA_POST_EMS \ ", \ "trac
LZ273548120CN king_number \ ", \ ""}}, \ "notes " : \ test \ ""}}; Type=application/json
'-f file1=@ \ "C: \ Users \ Administrator/Desktop/PP/PP - D - 79024859 \ LZ273548120CN PNG
\ "'
Note: Unnecessary use of X - or - the request, the POST is already inferred.
* Trying 64.4.249.23...
* TCP_NODELAY set
* Connected to api.paypal.com (64.4.249.23) port 443 (# 0)
POST/v1/customer/disputes/PP - D - 79024859/dojo.provide - evidence of HTTP/1.1
Host: api.paypal.com
The user-agent: curl/7.64.1
Accept: */*
Authorization: Bearer A21AAMsI4ZYkaJbKfvCWwaqXc98PSq71uZoVqhJOzVy - RzLIt76922Gc
GHmdKIK1MhCPWupKXq1C0Teny49LiCNrH7U4jIs3w
The Content - Length: 223904
The content-type: multipart/related; A boundary=- WebKitFormBoundary7MA4YWxkTrZu0g
W; A boundary=-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 42 e7b79977d3421a
Expect: 100 - the continue

* We are completely uploaded and fine

{" name ":" RATE_LIMIT_REACHED ", "debug_id" : "e8b878c715d9b", "message" : "Too many requ
Ests. Blocked due to rate limiting. ", "links" : []} * Connection # 0 to host API. Payp
Al.com left intact
Curl: (3) bad range specification URL in position 2:
[{" evidence_type ":
^
Note: Unnecessary use of X - or - the request, the POST is already inferred.
* Could not resolve the host: "PROOF_OF_FULFILLMENT", "evidence_info
"1
* Closing the connectionCurl: (6) Could not resolve the host: "PROOF_OF_FULFILLMENT", "evidence_info
"Curl: (3) the unmatched brace URL in position 1:
{" tracking_info ":
^
Curl: (3) bad range specification URL in position 2:
[{" carrier_name ":
^
Note: Unnecessary use of X - or - the request, the POST is already inferred.
* Could not resolve the host: "CN_CHINA_POST_EMS", "tracking_number
"* Closing the connection 2
Curl: (6) Could not resolve the host: "CN_CHINA_POST_EMS", "tracking_number
"Curl: (3) the unmatched close brace/bracket URL position in 16:
"LZ273548120CN"}}], "notes" :
^
Curl: (3) the unmatched close brace/bracket in the URL position 7:
"Test"}}; Type=application/json '
^
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • C#
  • Related