request_util.h 944 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (c) 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_
  5. #define GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_
  6. #include <memory>
  7. #include <string>
  8. namespace base {
  9. class DictionaryValue;
  10. }
  11. namespace google_apis {
  12. namespace util {
  13. // If-Match header which matches to all etags.
  14. extern const char kIfMatchAllHeader[];
  15. extern const char kContentTypeApplicationJson[];
  16. // Returns If-Match header string for |etag|.
  17. // If |etag| is empty, the returned header should match any etag.
  18. std::string GenerateIfMatchHeader(const std::string& etag);
  19. // Creates a Parent value which can be used as a part of request body.
  20. std::unique_ptr<base::DictionaryValue> CreateParentValue(
  21. const std::string& file_id);
  22. } // namespace util
  23. } // namespace google_apis
  24. #endif // GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_