How can my app parse the Twitter response when someone using a curl command, like this:
curl -v -H 'X-Auth-Service-Provider: https://api.twitter.com/1/account/verify_credentials.json' -H 'X-Verify-Credentials-Authorization: OAuth realm="http://api.twitter.com/", oauth_consumer_key="**jhtmLUypg82g", oauth_signature_method="HMAC-SHA1", oauth_token="419590-jkI7yGUDRmykzVKrgoLhXSq67TEa开发者_StackOverflow社区5ruc4GJCwbgakU", oauth_timestamp="1278339950", oauth_nonce="bgHjmTTQIZvqvlfXM5dsYxnoGD0AQR3Fmi7Q6Y", oauth_version="1.0", oauth_signature="RbNmGfE7Rs9J1kafTGwuUikLh4o%3D"' -F "file=@/path/to/file" http//myapp.com/upload.json
how can i check if twitter response returns 200 code or 401 (Unauthorized) in order procced the file handling..?
any help will be highly appreciated :-)
精彩评论