atscppapi  1.0.9
C++ wrapper for Apache Traffic Server API
 All Classes Files Functions Enumerations Enumerator Macros
ClientRequest.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 LinkedIn Corp. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
4  * except in compliance with the License. You may obtain a copy of the license at
5  * http://www.apache.org/licenses/LICENSE-2.0
6  *
7  * Unless required by applicable law or agreed to in writing, software distributed under the
8  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
9  * either express or implied.
10  *
11  */
12 
13 /**
14  * @file ClientRequest.h
15  * @author Brian Geffon
16  * @author Manjesh Nilange
17  */
18 
19 #pragma once
20 #ifndef ATSCPPAPI_CLIENTREQUEST_H_
21 #define ATSCPPAPI_CLIENTREQUEST_H_
22 
23 #include <atscppapi/Request.h>
24 
25 namespace atscppapi {
26 
27 struct ClientRequestState;
28 
29 /**
30  * @brief Encapsulates a client request. A client request is different from a
31  * server request as it has two URLs - the pristine URL sent by the client
32  * and a remapped URL created by the server.
33  */
34 class ClientRequest : public Request {
35 public:
36  /**
37  * @private
38  */
39  ClientRequest(void *raw_txn, void *hdr_buf, void *hdr_loc);
40 
41  /**
42  * Returns the pristine (pre-remap) client request URL
43  *
44  * @return Url Reference to non-mutable pristine URL.
45  */
46  const Url &getPristineUrl() const;
47 
48  ~ClientRequest();
49 private:
50  ClientRequestState *state_;
51 };
52 
53 }
54 
55 #endif /* ATSCPPAPI_CLIENTREQUEST_H_ */