Skip to content

Commit 022daad

Browse files
committed
Extract HttpHeaders, HttpMethods and MimeTypes into their own classes
1 parent 8b9b35d commit 022daad

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright (c) 2015 ServiceStack LLC. All rights reserved.
2+
3+
package net.servicestack.client;
4+
5+
public class HttpHeaders {
6+
public static final String Accept = "Accept";
7+
public static final String ContentType = "Content-Type";
8+
public static final String ContentLength = "Content-Length";
9+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) 2015 ServiceStack LLC. All rights reserved.
2+
3+
package net.servicestack.client;
4+
5+
public class HttpMethods {
6+
public static final String Options = "OPTIONS";
7+
public static final String Head = "HEAD";
8+
public static final String Get = "GET";
9+
public static final String Post = "POST";
10+
public static final String Put = "PUT";
11+
public static final String Delete = "DELETE";
12+
public static final String Trace = "TRACE";
13+
public static final String Patch = "PATCH";
14+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (c) 2015 ServiceStack LLC. All rights reserved.
2+
3+
package net.servicestack.client;
4+
5+
public class MimeTypes {
6+
public static final String Json = "application/json";
7+
public static final String Xml = "application/xml";
8+
9+
public static final String FormUrlEncoded = "application/x-www-form-urlencoded";
10+
public static final String MultiPartFormData = "multipart/form-data";
11+
12+
public static final String PlainText = "text/plain";
13+
public static final String Csv = "text/csv";
14+
public static final String JavaScript = "text/javascript";
15+
public static final String ServerSentEvents = "text/event-stream";
16+
17+
public static final String Binary = "application/octet-stream";
18+
public static final String ProtoBuf = "application/x-protobuf";
19+
public static final String MsgPack = "application/x-msgpack";
20+
21+
public static final String ImagePng = "image/png";
22+
public static final String ImageGif = "image/gif";
23+
public static final String ImageJpg = "image/jpeg";
24+
}

0 commit comments

Comments
 (0)