Network Plugin - Add remaining HTTP method types to mock routes (#1962)
Summary:
Currently, mock routes can only be created for GET and POST HTTP method types. Mocks should support all the valid HTTP method types.
See specification for a list of valid types:
https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
This was requested in issue: https://github.com/facebook/flipper/issues/1960
Here is a screen shot showing the new values added to the select list:

## Changelog
Network Plugin - support all valid HTTP method types in mock routes
Pull Request resolved: https://github.com/facebook/flipper/pull/1962
Test Plan:
Define mock routes using additional method types
Using "Flipper Messages" plugin, verify that new types have been sent to device
Reviewed By: passy
Differential Revision: D26635050
Pulled By: mweststrate
fbshipit-source-id: 6d85ac346bd18687516a3566d1048982ec7cae46
This commit is contained in:
committed by
Facebook GitHub Bot
parent
29d16feed5
commit
4da2b52803
@@ -245,7 +245,17 @@ export function MockResponseDetails({id, route, isDuplicated}: Props) {
|
|||||||
<StyledSelect
|
<StyledSelect
|
||||||
grow={true}
|
grow={true}
|
||||||
selected={requestMethod}
|
selected={requestMethod}
|
||||||
options={{GET: 'GET', POST: 'POST'}}
|
options={{
|
||||||
|
GET: 'GET',
|
||||||
|
POST: 'POST',
|
||||||
|
PATCH: 'PATCH',
|
||||||
|
HEAD: 'HEAD',
|
||||||
|
PUT: 'PUT',
|
||||||
|
DELETE: 'DELETE',
|
||||||
|
TRACE: 'TRACE',
|
||||||
|
OPTIONS: 'OPTIONS',
|
||||||
|
CONNECT: 'CONNECT',
|
||||||
|
}}
|
||||||
onChange={(text: string) =>
|
onChange={(text: string) =>
|
||||||
networkRouteManager.modifyRoute(id, {requestMethod: text})
|
networkRouteManager.modifyRoute(id, {requestMethod: text})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user